Hi there,
I know that C++ is backward compatible with C.
How can I use getChar() equivalent in C?
Why the need to declare a namespace std in on the top of the header,otherwise there will be a "undeclared indentifier cout" error message
When I type cin, i don't really know whats wrong,what is the package to import,is a way 2010 will hint you the package to declare like eclipse for java.
The thing is I was typing include on top of the list
How can I use "#include<" -> Selection List to find the include for the reading file.
It isn't as convenient as using eclipse.
Thanks.
I know that C++ is backward compatible with C.
How can I use getChar() equivalent in C?
Why the need to declare a namespace std in on the top of the header,otherwise there will be a "undeclared indentifier cout" error message
Download http://go.microsoft.com/?linkid=9709949 to download Visual Studio 2010
1) File->New->Project
Create a new project in directory: C:\Users\Lenovo\Desktop\new\test\Debug\test.exe
2) Application Settings->Console Applications->New Project
3) Source File->New Item->test.cpp
On Test.Cpp
#include <stdio.h>
#include <iostream>
using namespace std;
int main(int argv){
cout << "Hello World" << endl;
cout << "Press any key and hit enter to continue" << endl;
getchar();
return 0;
}
Press Build 'F7' to Build Project
Press 'F5' to run the Project
When I type cin, i don't really know whats wrong,what is the package to import,is a way 2010 will hint you the package to declare like eclipse for java.
The thing is I was typing include on top of the list
How can I use "#include<" -> Selection List to find the include for the reading file.
It isn't as convenient as using eclipse.
Thanks.
Last edited:

