error

Everytime I write even a basic C++ code and try to compile it, it gives me an error saying.. "No iostream directory found" and build is unsuccessful.
Kindly help me, what shall I do to fix this.!!
Below is the code.


#include<iostream.h>
#include<conio.h>
main()
{
char name[15];
cout<<"enter your name:";
cin>>name;
cout<<"your name is:"<<name;
return 0;
}


try iostream not iostream.h
And use int main() instead of just main().

And qualify cout and cin with the std:: namespace.

And indent your code and use code tags.
1
2
3
4
5
6
7
8
9
10
#include<iostream>

int main()
{
    char name[15];
    std::cout<<"enter your name:";
    std::cin>>name;
    std::cout<<"your name is:"<<name;
    return 0;
}
Topic archived. No new replies allowed.