error on non existing line

Hi,

This post is in addition to my other one about a bug.
I am getting an error that is supposedly on line 30 of ui.h. However I only have 18 lines in that file. The error is actually on ui.cpp line 13. Adding the number of lines from ui.h -1 to the ui.cpp i find the error place.
Does anyone know why its doing that? shouldnt it say ui.cpp line 13?

let me know if u need more information because Ive never seen this happen and dont even know where to start to fix it
Last edited on
What is the exact error message and what compiler do you use? It's also helpful if you could post the code.
http://www.cplusplus.com/forum/general/71397/

its all the same information im just asking about a different problem in that thread.

Im just curious to know why g++ would "attach" the cpp at the end of the .h when it never did that before...
If you have a line like this #include "ui.cpp" on the very end of you ui.h, the compile basicly inserts the contents of ui.cpp in ui.h.
EDIT: Look below!
Last edited on
OOOOOOOOOOh!!!!!!!!! I get it now! I've seen your other post and now I get it!!!!!!!!!
Becouse all in your ui.cpp are definitions for the functions in ui.h, those lines add up to your ui.h!!
but usually when i get an error on the cpp it tells me ui.cpp it just started doing that a couple days ago o0
This doesn't sound right? Are you sure you are compiling the correct file? I'm asking because it has happened that people think they compile one file but in the end it turns out they compiled some other file, often in a different directory.
Topic archived. No new replies allowed.