Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3042

Noob question: Copied functions to header file, now tons of errors

$
0
0
Hello, Im a n00b with c++ and was building my entire program in the main.cpp, including all function defenitions. This gave troubles though, because i couldnt call functions from functions that were declared below that line. Eg: Code: --------- string dosomething() { dothis(); // errors because dothis isnt declared yet } void dothis() { //do stuff } --------- I tried to fix this by copying all my functions / includes / variable declarations to a header file, and include that in my .cpp file, but now i have hundreds of strange errors, like: string not declared, all the function names are suddenly unindentified What did i do wrong? Its probably some really big n00b mistake, but still

Viewing all articles
Browse latest Browse all 3042

Trending Articles