Skip to main content
gamedev.net
🔒 Locked

Dev-C++

Started by DarkWhoppy Aug 5, 2003 at 10:22 AM 7 replies 350+ views
Original Post
DarkWhoppy
DarkWhoppy
Whats up with Dev-C++ not wanting to compile classes!?!?! I even downloaded the tutorial off of the Game Tutorials website that was made for Dev-C++ and it still wouldn''t compile without errors! Anyone know of a better freeware C++ compiler?
Visit the 3DHangout
Drevay
Drevay
Dev-C++ isn''t a compiler, it''s an IDE. There is something YOU are doing wrong, basically, to not make it compile. It uses the MinGW compiler (minimalist gnu for win32). The compiler is excellent. You are wrong.


"Few creatures of the night have captured our imagination like vampires..." Godsmack: Vampires.
(c) 2003 DigiAC - My solo company in progress.
_________________Politics is the ability to foretell what is going to happen tomorrow, next week, next month and next year. And to have the ability afterwards to explain why it didn't happen. -- Winston ChurchillGDNet-0.2 - rate users the easy way with this nifty Firefox extension. Updated with new features.
Jason2Jason
Jason2Jason
did you check you put a semi colon on the end of the class like this:



class myclass
{

public:
int var;

}; //this semicolon.



Its easy to overlook sometimes.

-J


Erunama
Erunama
And also, if you want help, it helps to actually tell us the errors you are receiving, as well as the portion of code that you receive the error on. Bad mouthing a perfectly good (and perfectly free) IDE/compiler bundle without backing yourself up (in the Lounge, nonetheless), is no way to go about fixing your problems.

Plently of people have gotten Dev-C++ to work for them flawlessly (myself included).

|.dev-c++.|.the gimp.|.seti@home.|.dbpoweramp.|.torn.|.=w=.|
WiseElben
WiseElben
Yes, remember the semicolon, I forget it many times.

The new versions of Dev-C++ did not work for me. That is why I got Visual Studio .NET. Can you post up the source code?

If there is nothing wrong with the source code, you can try downloading an older version of MinGW (Or Dev-C++ with an older version of MinGW in it).

What you can also do is download Borland (I don''t remeber how to spell it, I think its pretty close...) and set it up so Dev-C++ compiles with Borland.




WiseElben.com - Game programming tutorials, articles, and community.

E-mail:wiseelben@wiseelben.com
AIM: WiseElben
ICQ: 299127026

[edited by - GameDev Staff on September 27, 1989 9X:58:97 XMS] For violating Article 43 Page 456 Paragraph 251 Line .042
DarkWhoppy
DarkWhoppy
Here it is...and the error...



class Monster()
{
string name;
int expe;
int hitpoints;

public:
Monster(string mName,int exp,int hp);
~Monster();

int Attack();
int Die(int e);
};


1) 14 C:\Dev-Cpp\My Projects\Adventure2\monster.h
parse error before public''

2) 8 C:\Dev-Cpp\My Projects\Adventure2\monster.h
parse error before
)'' token


There could just be something wrong with the my "Class"...im still a newbie so im not sure.
Visit the 3DHangout
Oluseyi
Oluseyi
class Monster // no parentheses
{
...
};
Erunama
Erunama
quote:
Original post by DarkWhoppy
There could just be something wrong with the my "Class"...im still a newbie so im not sure.


Where did you learn to program? You either need a better book (or a book in the first place) or a good teacher. Now you know not to blame the compiler, especially when you make bad mistakes.

Next time, if you are having trouble with code relating to a class, perhaps you should search the web for some information about writing C++ classes.
DarkWhoppy
DarkWhoppy
Actually I downloaded the tutorial on classes from Game Tutorials and that wouldn't compile either. So I thought maybe it was the compiler... And yes I have a book...I've read it already and need to buy a new one because this one is just the basics of C++.

[edited by - DarkWhoppy on August 5, 2003 11:57:09 PM]
Visit the 3DHangout

Topic Locked

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

Sign in to reply to this topic.