okay, i've written a simple hello world program...
//a simple hello world program
#include<iostream>
int main()
{
std::cout<<"Hello World!\n";
char response;
std::cin>> response;
return 0;
}
and when i compile/build and Run it, the DOS window opens and windows give the gud ol' "send, Don't send" error.....after that, there is the following message in the window, which is also in the Build log :
Process terminated with status -1073741819 (0 minutes, 21 seconds)
well, in the window, it says that process returned -1073741819....which i'm guessing is a garbage value?
i've searched for this over the net, can't find it, and i'm pretty sure the coding is not the problem...help me out?
well..thanks for at least replying....and i had read the rules...just a little frustrated...
i'm using windows xp sp2
i reinstalled C::B since the last post....and tried again, this time i'm getting an error saying the iostream file/directory doesn't exists.....i'm pretty sure minGW is installed, so why?
here's the build log:
mingw32-gcc.exe -I"C:\Program Files\CodeBlocks\MinGW" -c "C:\Documents and Settings\manish\My Documents\CodeBlocks\My Intro To OOP\Untitled1.c" -o "C:\Documents and Settings\manish\My Documents\CodeBlocks\My Intro To OOP\Untitled1.o"
C:\Documents and Settings\manish\My Documents\CodeBlocks\My Intro To OOP\Untitled1.c:2:19: error: iostream: No such file or directory
C:\Documents and Settings\manish\My Documents\CodeBlocks\My Intro To OOP\Untitled1.c: In function 'main':
C:\Documents and Settings\manish\My Documents\CodeBlocks\My Intro To OOP\Untitled1.c:6: error: expected expression before ':' token
C:\Documents and Settings\manish\My Documents\CodeBlocks\My Intro To OOP\Untitled1.c:8: error: duplicate label 'std'
C:\Documents and Settings\manish\My Documents\CodeBlocks\My Intro To OOP\Untitled1.c:6: note: previous definition of 'std' was here
C:\Documents and Settings\manish\My Documents\CodeBlocks\My Intro To OOP\Untitled1.c:8: error: expected expression before ':' token
Process terminated with status 1 (0 minutes, 5 seconds)
4 errors, 0 warnings
this thing hapenned when i initially installed code::blocks, but for some reason, it was able to at least compile the file later, and started giving the error message i posted earlier. Now, its even more hopeless.
i know C++ coding...the logic to the programs...i don't understand this! :(
and i was coding in an 'empty file' in an 'empty project'...and even a direct 'empty file'...same result
okay...i restarted the whole thing.
this is the code:
#include<iostream>
int main()
{
using std::cout;
using std::cin;
cout<<"Hello World!\n";
char response;
cin>> response;
return 0;
}
after that i hit "build and run", which caused a shell window to appear.
here is a screenshot:
http://i48.tinypic.com/2vjrf44.jpg
when i hit the key, this was in the build log:
Checking for existence: C:\Documents and Settings\manish\My Documes\CodeBlocks\123\bin\Debug\123.exe
Executing: "C:\Program Files\CodeBlocks/cb_console_runner.exe" "C:\Documents and Settings\manish\My Documes\CodeBlocks\123\bin\Debug\123.exe" (in C:\Documents and Settings\manish\My Documes\CodeBlocks\123\.)
Process terminated with status -1073741819 (4 minutes, 32 seconds)
i don't know whats happening :( i'll never advance in c++ this way...