laserlight what exacly do u mean??.. its just a simple program.. i cant run it.. i need a solution.. i love programing.. if i can run a very simple program like this.. how i wan learn programing![]()
This is a discussion on Problem with c++ error n dont execute [W7 64xbit] within the C++ Programming forums, part of the General Programming Boards category; laserlight what exacly do u mean??.. its just a simple program.. i cant run it.. i need a solution.. i ...
laserlight what exacly do u mean??.. its just a simple program.. i cant run it.. i need a solution.. i love programing.. if i can run a very simple program like this.. how i wan learn programing![]()
Well, here's a simple test. Copy this program to a file named myprogram.cpp:Originally Posted by slambergamer
Now, from an open command prompt window, at the directory where myprogram.cpp resides, run this command:Code:#include <iostream> int main() { std::cout << "Hello world!" << std::endl; }
Then run this command:Code:g++ -o myprogram myprogram.cpp
What happens?Code:myprogram
If the first command fails because g++ is not available, then you need to add the directory with g++ into your system path (you can find it somewhere in the Dev-C++ directory hierarchy).
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
What's the over/under on the quickly disappearing window explanation?
i can see the "hello world" text after typing the myprogram in my cmd...
alot of error... and each source code don have same error.. i dont realy know.. bcoz i newbis.. sory.. i will try again laterQuote:
when i press the *.exe nothing pop up... i got dl other c++ source file.. most of it.. have error..
WHAT error?
In that case, you have just compiled a C++ program that was run perfectly fine.Originally Posted by slambergamer
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
but y i cant run it in myprogram.exe ..
http://i559.photobucket.com/albums/s...bergamer/c.jpg ..here
Observing the fact that you were unable to use g++ because you did not add its directory to the system path, I conclude that you first compiled using the compiler from your IDE?
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
ok.. what is ide??.. sry for my lame -.-.. i use the dev++ to compile.. n i copy both file in same directory.. looking good if i run it from cmd.. do i need to run all my compiled source code in cmd ---?
Last edited by slambergamer; 12-17-2010 at 11:13 PM.
Dev-C++ is an IDE.
Since it works for you, just do it.Originally Posted by slambergamer
I suspect that you ran into the "disappearing command prompt" problem as was mentioned earlier in this thread, but somehow did not even see the command prompt flash by and disappear.
The problem is that you told us that you ran your program from a command prompt, which usually indicates that you ran using a separate command prompt, rather than the one from your IDE, hence I ruled out this problem early on.
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
..oh sory my bad,.. im new.. n my english kinda bad -.-.. thx all.. i realy2x apperiate u guyz help!