Damn include guards!!

Started by
21 comments, last by wforl 15 years, 11 months ago
Maybe you should just start to read what we are trying to tell you. We have no multiple times told you how to solve your problems, but you don't seem to listen to any of us. Just do as Evil Steve said and you won't have problems with multiple defined symbols anymore...
Advertisement
Quote:Original post by LittleJimmy
Okay so now some other problems with my engine are starting to appear now that i'm no longer using globals, man I'm such a noob :(

Eh. Your problem is not that you're a noob. Your problem is that you're a whiner. You're so consumed with complaining about how your program is not working that you're not paying attention to the instructions and solutions others are offering you. Almost everyone's program doesn't work at the beginning. So what? Fix it.

Until you can change that, you will fail to write anything of interest.
Yeah thats real classy guys, hurling insults and all, but the problem has been fixed and I understand what I did wrong so thanks for the help.
Quote:Original post by LittleJimmy
Yeah thats real classy guys, hurling insults and all.

They weren't "hurling insults". The problem is not that you were being insulted, but that you're a whiner. It's rare to see someone take so long to understand such a straightforward concept, and it's equally rare to see so many different posters be so patient as to continue explaining it to you. Doing less whining and more thinking will really help you in this area.
Quote:Original post by LittleJimmy
Yeah thats real classy guys, hurling insults and all...

No insults were hurled. The behavior you've demonstrated in this thread was merely called precisely what it is. If you've been given the solution multiple times and extensive explanations as to why, can't figure it out and just effectively throw tantrums... you're behaving like a whiny child.

Good luck with your programming career.
I dont understand why you guys keep saying I'm a whiner, I was telling you that my program didnt work so that you guys can understand just how new I am at this (which is why I'm in the for beginners section) not because I'm whining about it, then you go ahead and say goodluck with my programming career, I think you guys just misinterpreted my message which made it seem as if I was whining, but I assure you I wasnt.

Oh and by the way, I tried to follow the intructions, which was use extern mainly, but I couldnt get it working, this is my first time im attempting to do such a large project so please try not to be so hard on me, I'm still learning.
Absolutely required reading.
Quote:Original post by SiS-Shadowman
I think you are confusing declaration and definition.
Let me give you an example:

*** Source Snippet Removed ***

Ok. Now this is a declaration.

If that is a declaration, how come this code yields a multiple definition error?
struct Car{    float speed;    string Name;};struct Car{    float speed;    string Name;};// test.cpp:10: error: redefinition of `struct Car'// test.cpp:4: error: previous definition of `struct Car'

struct Car { ... }; is obviously a definition. A declaration looks like this:
struct Car;

Quote:
Just as in my above example, you have declared your class and the member functions, but you have not defined them.

The class is defined, the member functions aren't. A class declaration looks like this:
class Engine;
Hm, I confused that, you're right.
If that would have been a declaration, the compiler could not know, wich of multiple declarations is the one, he should use.
Hm, that just proves it, one never learns enough to master that language.
I've gotta pay more attention next time, thanks for the hint.
Quote:Original post by Gage64
Absolutely required reading.


It was already posted, and the original poster said he'd read it, but apparently it didn't make enough sense, since he still had "HWND hWnd;" in a header. I thought the bit under 'Fixing Problem 4' was reasonably clear, but perhaps not.

This topic is closed to new replies.

Advertisement