Skip to main content
gamedev.net
🔒 Locked

C++ classes problem

Started by Damocles 1 reply 150+ views
Original Post
Damocles
Damocles
So I have the following classes: Actor Particle FlatEffects Actor is my base in-game object class and has been successfully working for ages and hasn''t been modified in weeks. Particle is a particle systems class which works fine and also hasn''t been modified in weeks. So I create a flatEffects class, using VC6''s new class feature extending from the Particle class. I add some simple code and go to test it, and now Im getting a ton of errors all saying "Base class ''Actor'' is undefined" What the hell? I haven''t touched it, so how can it suddenly become undefined? Everything worked perfectly until I created the new class. I''ve checked the new class and it''s all normal, it extends from Particle as expected, and the functions code is simple and shouldn''t in any way effect compiling. How the hell can creating one new class suddenly screw up one that hasn''t been modified for ages? Does anyone have any idea what might be causing this?
------------------------------------------[New Delta Games] | [Sliders]
Spearhawk
Spearhawk
Sounds like a include problem. Are you including the diffrent header files in each other. E.g Actor.h includes Particle.h and Particle.h includes Actor.h?
Damocles
Damocles
Nope, I checked and re-checked the include files and they are all as should be. And like I said before, the classes of Actor and Particle haven''t been altered in weeks. The new class (flateffects) simply includes its own header, and its header includes that of particle which it subclasses. All seems normal to me.

There''s something really bizarre going on here :/
------------------------------------------[New Delta Games] | [Sliders]

Topic Locked

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

Sign in to reply to this topic.