#include <iostream>
usingnamespace std;
int main ()
{
int i;
cout << "Please enter an integer value: ";
cin >> i;
cout << "The value you entered is " << i;
cout << " and its double is " << i*2 << ".\n";
return 0;
}
the iostream is unable to open what should i do??
Compiling NONAME01.CPP:
Error NONAME01.CPP 1: Unable to open include file 'IOSTREAM'
i have no idea why "namespace std" is not recognized, but it's better if you use visual studio 2010 / 2008. TC++ is very old (and deprecated? (my opinion))
#include <iostream.h>
int main ()
{
int i;
cout << "Please enter an integer value: ";
cin >> i;
cout << "The value you entered is " << i;
cout << " and its double is " << i*2 << ".\n";
return 0;
}
You should tell your professor that he is a idiot if forces you to use such compilers.
In India, all computer science books for class 11 and 12 tell us to use Borland Turbo C++. The code we write in our exams should be completely compatible with TC++. All teachers are trained on TC++. All inter-school competitions use TC++. I talked about this with my computer teacher and she said that even she prefers to use new compilers but the education system is corrupt here. Books here still tell us that sizeof(int) is 2, which means that the syllabus hasn't been upgraded since 16-bit computers existed.
Luckily, the web has a lot to offer and I am up to date. Also my school uses VC++ 6.0, which is compatible with both C++ dialects.
If you are really interested in C++, get a good compiler and learn from a good tutorial. But you also have to be good at TC++ because it is used in your institute.
Some functions exist in TC++ but not in standard C++, like gotoxy(int,int) and clrscr(). You may find good alternatives to these functions in the Articles section of this website.