-
Dev-C++
I am following the instructions provided by this home website http://www.cprogramming.com/tutorial.html#c++tutorial
but i'm having trouble compiling it.
What am i doing wrong?
Code:
#include <ionstream>
using namespace std;
int main()
{
cout<<"This is a test Program!\n";
cin.get();
return 1;
}
\Programs\Programing\Programs\Untitled1.cpp E:\Programs\Programing\Programs\E ionstream: No such file or directory.
E:\Programs\Programing\Programs\Untitled1.cpp In function `int main()':
5 E:\Programs\Programing\Programs\Untitled1.cpp `cout' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.) 6 E:\Programs\Programing\Programs\Untitled1.cpp `cin' undeclared (first use this function)
and could someone please explain to my what in the world ionstream is and whatthe point of #include <ionstream>?
Thanks
-
You have a typo error: it should be iostream, not ionstream (this has to do with Input/Output, not ions).
Also, change the return 1 to return 0 (or remove it entirely as it is optional in C++ for the main function).
-
I also tried copy pasting it but it still won't compile, what do i do?
-
It should be <iostream> (no 'n'), and the point is so you can use standard I/O streams like cout and cin.
-
Ion Stream sounds like a cool company name, though...
-
THANKS ALOT, i feel so dumb now, but still, what is iostream?
-
A standard header that is included "so you can use standard I/O streams like cout and cin".
-
Input/output streams such as cin, cout. Read data from keyboard/output to screen and the like.
-