Jump to content
  • Advertisement
Sign in to follow this  
dustydoodoo

Dev-C++

This topic is 4952 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

Ummm, there is something wrong with my Dev-C++ compiler, for some reason, when i try and compile my win32 program, it has an error about the constructor/destructor, it doesnt know what they are, it thinks im trying to make a function with no function type. Well how would i fix this?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by dustydoodoo
No No, its not my code, its the compiler, because it compiles with my other compiler (Borland 5.5).

All compilers are different. You may have to make some changes to your code to get it to work on multiple compilers.

Share this post


Link to post
Share on other sites
Quote:
Original post by dustydoodoo
No No, its not my code, its the compiler, because it compiles with my other compiler (Borland 5.5).


The reason we ask to see code is that it is not cross compiler compliant. If you have code that works in Visual Studio 6, it might not work in Visual Studio 7. It could perhaps work in Dev-CPP. If I took code from Dev-CPP, I'm sure Borland might have some troubles with a few things.

As long as you are using the most recent version of Dev-CPP 4.9.9.2 Beta, the compiler works well, it just does not like something in your code. That's the best way to explain this.

Share this post


Link to post
Share on other sites

SetDefault()
{
BitmapLoaded = false;
}

Needs to be:

void SetDefault()
{
BitmapLoaded = false;
}


You must specify the return type for non-constructors/deconstrctors.

Share this post


Link to post
Share on other sites
Quote:
Original post by Drew_Benton

SetDefault()
{
BitmapLoaded = false;
}

Needs to be:

void SetDefault()
{
BitmapLoaded = false;
}


You must specify the return type for non-constructors/deconstrctors.


WHAT!!?? But i need that constructor/destructer

Share this post


Link to post
Share on other sites
Quote:
Original post by dustydoodoo
Quote:
Original post by Drew_Benton

SetDefault()
{
BitmapLoaded = false;
}

Needs to be:

void SetDefault()
{
BitmapLoaded = false;
}


You must specify the return type for non-constructors/deconstrctors.


WHAT!!?? But i need that constructor/destructer

SetDefault() is not a contructor unless the class name is SetDefault. You can call SetDefault() from the constructor
Bitmap()
{
SetDefault();
}

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!