Saturday, 10 August 2013

unable to see the output of c++ program in the console

unable to see the output of c++ program in the console

I have installed the eclipse ide(cdt) on my windows 8 laptop and tried
writing a simple c program to check whether the program executes.it did
not execute and gave the error : "binary not found". so i did some
searching online and realized that my system did not have a c/c++ compiler
installed. so i installed MinGW and selected the c and c++ compilers
during installation. then i set the PATH environment variable to C:\MinGW.
then i reopened eclipse, wrote a simple c program and it worked as
expected! then i created a c++ project, wrote a simple piece of code and i
could not see the output in the console! here is the code:
#include<iostream>
using namespace std;
int main()
{
cout<<"sample text";
return 0;
}

No comments:

Post a Comment