c++ compiler

why is it that <iostream.h>not working…
is it necessary to use “using namespace std;”

Just try #include < iostream> without the .h…

Also, you don’t to use the line using naespace std; You can do something like:

#include <iostream>
int main() {
std::cout << "Hello" << std::endl;
return 0;}


1 Like

int main() {
std::cout << “Hello” << std::endl;
return (0);}

  1. you should use header files without .h extension like #include but when u want to
    include a c standard header write it with .h extension like #include <conio.h>

  2. Its not necessary to use using namespace std; but if you are not writing it then you have to use
    std:: in front of every function of the std library you are using in the program.