Hi guys im a c++ noob and im doing a chapter on containment in my book (listing14_4.cpp). I keep getting the error "expected declaration at end of line" on line 31 of stdio.h. I think the definition for this is in cdefs.h .Features.h is included by stdio.h, and cdefs.h includes features.h but stdio.h does not include cdefs.h, still I included it myself in stdio.h and got exactly the same error and I put the containing directories in my compilers search option. Please how can I fix it?
On line 1 of listing14_4.cpp you start defining a class. On line 2, you direct the compiler to copy and paste the contents of string.hpp between the class name and the opening brace of your class definition.
Put your #include directives at the top of the file.