Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Weird Dev C++ class/struct errors

This topic is 5408 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I keep getting weird errors from Dev-C++ with code that works on MSVC. This is whats basicly happening:
struct MyStruct
	int MyInt;	

class MyClass
	MyStruct TheStruct;

int main(int argc, char *argv[])
	XXfile file;
  	return 0;
I get an "''MyStruct is used as a type, but not defined as a type error''", and only when i create the struct in a class. If I made one in the main function it would compile properly. I also tried using:
typedef struct _MyStruct
	int MyInt;	
Am I missing something? Like I said, it works fine in VC++.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!