Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: zdubair on December 19, 2015, 04:00:28 pm

Title: iostream
Post by: zdubair on December 19, 2015, 04:00:28 pm
Hello

When i run this
// my first program in C++
#include <iostream>

int main()
{
  std::cout << "Hello World!";
}

i get error

iostream  - no such file or directory

What is wrong?

Greetings zdubair.com.se
Title: Re: iostream
Post by: stahta01 on December 19, 2015, 04:28:22 pm
http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_My_simple_C.2B.2B_program_throws_up_lots_of_errors_-_what_is_going_on.3F (http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_My_simple_C.2B.2B_program_throws_up_lots_of_errors_-_what_is_going_on.3F)
Title: Re: iostream
Post by: Jenna on December 19, 2015, 07:46:47 pm
Most of the time a wrong file-ending. Most likely just *.c instead of *.cpp .
Title: Re: iostream
Post by: zdubair on December 19, 2015, 09:06:21 pm
OK  tx   :)  Works fine now....

Greetings zdubair.com.se