Borginator
2010-06-08 16:58:12 UTC
Firstly I have used Netbeans for Java projects.
I am currently running Netbeans 6.8 under Windows 7 32bit
I have used cygwin (following the instructions here on the Netbeans website) to install my C++ compiler and put the path for the bin directory on my machines Paths...
Now when I have the following code:
Code:
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
/*
*
*/
int main(int nNumberifArgs, char* pszArgz) {
int celsius;
cout << "Enter the temperature in Celsius:";
cin >> celsius;
int factor;
factor=212-32;
int fahrenheit;
fahrenheit= factor *celsius/100 +32;
cout << "Fahrenheit value is:";
cout << fahrenheit << endl;
system("PAUSE");
return 0;
The #include statements have the following error:
"Cannot find include file <NAME>" (where NAME is the name of the required include file)
and the cout/cin statements have the error "Unable to resolve identifier cout/cin "
The program will run and opens in an external terminal and works properly returning the following:
cygwin warning:
MS-DOS style path detected: C:\Program Files\NetBeans 6.8\dlight2\bin\nativeex
ecution\dorun.sh
Preferred POSIX equivalent is: /cygdrive/c/Program Files/NetBeans 6.8/dlight2/
bin/nativeexecution/dorun.sh
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Enter the temperature in Celsius:12
Fahrenheit value is:53
sh: PAUSE: command not found
Press [Enter] to close the terminal ...
Can someone please tell me how to fix the first two errors and enlighten me on the error of the terminal?
Many thanks in advance,
Simon
I am currently running Netbeans 6.8 under Windows 7 32bit
I have used cygwin (following the instructions here on the Netbeans website) to install my C++ compiler and put the path for the bin directory on my machines Paths...
Now when I have the following code:
Code:
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
/*
*
*/
int main(int nNumberifArgs, char* pszArgz) {
int celsius;
cout << "Enter the temperature in Celsius:";
cin >> celsius;
int factor;
factor=212-32;
int fahrenheit;
fahrenheit= factor *celsius/100 +32;
cout << "Fahrenheit value is:";
cout << fahrenheit << endl;
system("PAUSE");
return 0;
The #include statements have the following error:
"Cannot find include file <NAME>" (where NAME is the name of the required include file)
and the cout/cin statements have the error "Unable to resolve identifier cout/cin "
The program will run and opens in an external terminal and works properly returning the following:
cygwin warning:
MS-DOS style path detected: C:\Program Files\NetBeans 6.8\dlight2\bin\nativeex
ecution\dorun.sh
Preferred POSIX equivalent is: /cygdrive/c/Program Files/NetBeans 6.8/dlight2/
bin/nativeexecution/dorun.sh
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Enter the temperature in Celsius:12
Fahrenheit value is:53
sh: PAUSE: command not found
Press [Enter] to close the terminal ...
Can someone please tell me how to fix the first two errors and enlighten me on the error of the terminal?
Many thanks in advance,
Simon