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?
Read the forum rules....
This is not a forum for discussing general programming, but a forum to discuss using CB for programming...
Buy a GOOD C++ book and read!
dude i know C++......i have programmed before...but this is giving me a headache coz i don't know what i'm doing wrong!
the compiler is there, the ide is there, the code is there, but no output!!! i have read the FAQs, AND the User Manual.....can't seem to find what's wrong!!!
don't reply if u don't wanna help man, no one's asking you to flame me
OK, but you've not read the forum's rules and there is no version info for OS, CB, compiler, no full build log...
Do you use a project or this is a single compiled using single cpp file?
btw, you code sample works perfectly on my machine...
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
the same thing happened again:
build log:
http://pastebin.com/huZZXsL8
Please use .cpp for C++ Files!
Code::Blocks considers .c files to be C Programs.
Tim S.
okay.....its still the same....error
Quote from: ishu161 on June 30, 2010, 11:50:51 PM
okay.....its still the same....error
Then install the MinGW G++ needed for compiling C++ programs. Note, I really do not believe you got the same error.
But, I have seen a lot of people not install the C++ Compiler that could give about the same error again.
Please post new build log if you still need more help.
Tim S.
i believe i already have minGW installed.....it exists in the codeblocks directory...
Quote from: stahta01 on July 01, 2010, 01:09:21 AM
Please post new build log if you still need more help.
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...
Please Turn on FULL compiler logging and post full re-build log if you want any help.
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
FYI: re-build means clean and then build.
Tim S.
i had already activated it....anyways, i did it again...
and i'm not able to rebuild.....re-build and clean buttons are in-accesible
btw....is this what you mean:
before execution (build only)
http://pastebin.com/fNtzbz2y??
after execution:
http://pastebin.com/E9adRXQs
I give up helping you; no idea how you got that long of build log.
Tim S.
well, thanks for being honest :)
i'll figure something out....
if you know someone else who can...can you please provide me their link?
Remove any traces from mingw and reinstall the compiler.
It seems to be broken.