I installed code blocks in ma PC and tried to run the hello world programme, but the compiler is showing errors as "fatal error: iostream:no such directory" what shall I do .. help me out please
2/25/2017 7:56:41 AM
Gopal Krishna Mishra14 Answers
New Answerit allows you to use standard library containing cin cout endl etc. if you dont use this line you can still use cin cout endl etc but you have to use prefix std:: before them i.e. you have to write std::cout <<"hello world"<<std::endl; and when you use using namespace std cout <<"hello world"<<endl;
iostream is a header file that provides input and output services. if you want to use cin and cout you must have it and namespace allows you to use them without adding prefix std::
@saqib thnx bro it worked ..but it is again showing other error #include<iostream> int main() { cout<<"hello code blocks"<<endl; cout<<"I can do it"; return 0; } this is my programme !! and it is showing errors tht cout was not declared in this scope endl was not declared in this scope bla bla
oh yeah it worked @saqib.. but can u please xplain what is the significance of that line
thanku saqib.... thnx fr ur time.. all ur answers really cleared my doubts .. one last thing.. why do we use iostream ?😁😁 curious mind wat to do ??
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message