I am new to ubuntu, now I need to develop my assignment in C++. I am using codeblocks IDE to write c++ programs. Whenever I compile something in it, it gives these errors:
The program compiles fine with (yourcode.cc contains your sourcecode):
$ CXXFLAGS="-Wall -Werror -Wpedantic" make yourcode
stack.cc: In member function ‘int List::get()’:
stack.cc:76:1: error: control reaches end of non-void function [-Wreturn-type]
}
and invoking ./yourcode
outputs:
List size = 5
Element 1 2
Element 2 6
Element 3 8
Element 4 7
Element 5 1
Obviously your IDE is going to add some flags to the linker. Please show us your compile flags/setting. See the compile log or run the make command executing more verbose.
May have a look at. Code::blocks verbose build