![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | |
|
Newbie
Join Date: Nov 2004
Posts: 3
Rep Power: 0
![]() |
Quote:
My first program, using this compiler. got this error: C:/Dev-Cpp/include/c++/bits/stl_alloc.h:575: syntax error before `;' token C:/Dev-Cpp/include/c++/bits/stl_alloc.h:575: confused by earlier errors, bailing out make.exe: *** [main.o] Error 1 Execution terminated -can anyone help me out please?-- |
|
|
|
|
|
|
#2 |
|
Programming Guru
![]() |
These errors are from the compilers prewritten code "stl_alloc.h". Which i am assuming is called by #include <stdlib.h> which you dont need... so just remove it. This should work.
#include <iostream>
int main(int argc, char *argv[]) {
* *system("PAUSE");
* *return 0;
}However a better way to accomplish this, so you can add your own pause message in if you want. Is this... #include <iostream>
#include <conio.h> // Adds the getch() function, among other things...
int main(int argc, char *argv[]) {
// Output our message to the screen
std::cout << "Please press any key to continue..." << std::endl;
// Pause program execution until a key is pressed...
getch();
// Exit the program
return 0;
}
__________________
|
|
|
|
|
|
#3 |
|
The Supreme Ruler
![]() Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6
![]() |
~moved
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower |
|
|
|
|
|
#4 |
|
Expert Programmer
|
A syntactical error like this in a distributed header file is not a good thing, is it possible that you installed a corrupted version of the software or that you possibly modified that header file manually by accident?
__________________
Clifford Matthew Roche <geek@cliffordroche.com> Web Hosting: http://www.crd-hosting.com Consulting: http://www.crdev-consulting.com |
|
|
|
|
|
#5 |
|
Newbie
Join Date: Nov 2004
Posts: 3
Rep Power: 0
![]() |
Hmm..I'll try reinstall and turning my firewall off. Thanks for your help.
|
|
|
|
|
|
#6 |
|
Newbie
Join Date: Nov 2004
Posts: 3
Rep Power: 0
![]() |
Works now, thanks for your help
![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|