Skip to main content
GameDev.net gamedev.net
🔒 Locked

Visual C++ Header Problems

Started by jimnovy Mar 23, 2003 at 2:34 PM 0 replies 200+ views
Original Post
jimnovy
jimnovy
I''m kinda new to C++ and am having a problem with an object oriented hobby program im working on. I''m trying to declare an instance of a class inside of another class and getting some class redefinition errors. After some searching I found something recommended I begin the headers to the class declarations with an #ifdefine _CLASSNAME_H #define _CLASSNAME_H and end them with #endif, but if I do this, then it isnt defining the class I''m trying to instantiate. Thx in advance.
Kuladus
Kuladus
#ifndef CLASS_H
#define CLASS_H

...

#endif





using #ifdefine wouldn''t really make
much sense as class guards

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.