It compiles for me. As Moschops said, you probably don't have something installed. I use Dev-C++ 4.9.9.2 as well, and my version came with everything I needed, so I'm not quite sure what would be wrong.
Where did you get Dev-C++ from?
Edit: I'm pretty sure system commands are platform dependant. Replace system("pause") with cin.get(). What OS do you use?
NOOOO!!!! Not the system commands!
Seriously though, it's better to use something else like cin.get(). You could even do something like this:
1 2 3 4 5 6 7 8 9 10 11
#include <iostream>
usingnamespace std ;
int main()
{
cout << "I am your computer talking\n";
cout << "Press enter to continue...";
cin.get();
return 0 ;
}
If you still get errors after correcting your code, then maybe it's time to upgrade from Dev-C++ (it really should not be recommended by any sites anymore due to its age). Might I recommend Code::Blocks?
If you still get errors after correcting your code, then maybe it's time to upgrade from Dev-C++ (it really should not be recommended by any sites anymore due to its age). Might I recommend Code::Blocks?
I somewhat disagree. Sure it's old, but it's also very beginner friendly and it works.
Well, Dev-C++ still works for some systems, but here obviously something's phony. When I try to compile it with a newer version of GCC, it builds and links just fine. Now, maybe something got corrupted during the download, but either way right there we have two symbols that should be defined and that aren't, and Dev-C++'s compiler really could use an upgrade.
I suggest retrying the compilation of this program with Code::Blocks. It has a newer version of MinGW than Dev-C++, so if the error persists we'll know it's something else than an old compiler (which to fix, there may be a way to update the version of MinGW that Dev-C++ uses).
EDIT: If you like Dev-C++'s GUI, then instead of Code::Blocks you can try wxDev-C++.
I'd guess the software's been corrupted, or maybe he downloaded the IDE without the compiler. His code works as is with Dev on my computer. I have Windows 7 on a fairly new computer.
On a side note, you, Browni, should probably upgrade to wxDev-C++ as well, unless you've already upgraded the included MinGW. Dev-C++ was last updated in... what, 2003? 7-8 years is a long time for computers. http://wxdsgn.sourceforge.net/
-Albatross
2^11 posts (again), and counting (wouldn't it be fun if the people who hosted this website decided to change our post counts into binary?)
On a side note, you, Browni, should probably upgrade to wxDev-C++ as well,
I've wanted to upgrade for awhile, but it would be much easier if I could multiply 11000.0112 Kb/s by a factor of at least 101011102. I hate dial-up. :-(
Forgive me for depriving you the pleasure of announcing you're accomplishment. My inner programmer just jumps at the sight of a power of 2 (or a power of 2 minus 1). Not to mention my inner mathematician jumping at the sight of a Mersenne number.
Nah, don't mention it (and yes, dial-up sucks... do you have access to a university computer which is hooked up to a faster internet connection that you can maybe use under the pretext of "improving your computer science self-education"?).
did that, tried to run my code and I got "source code not compiled"
This would seem to indicate that you wrote some code, and then tried to run the executable without having actually made it.
It is not enough to just write code. You then have to compile it into objects, and then link it into an executable, and then you can run that executable.
Often, the compile and link stages are done together.
that error in the top post has something to do with the libraries in Dev-C++ being outdated... I still suggest using something else like wxDev-C++, but you can also do this..
under tools->compiler options->directories->libraries
delete the Dev-C++ file location there (probably only one file)... I would like to go through them one day and find the specific library that conflicts, but that seemed to help when I was messing around with Dev-C++