Hello World - differences between Visual Studio and NotePad++

Write your question here.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Visual Studio - It works perfectly. 
 #include <iostream>
int main()
{
	std::cout << "Hello World" << std::endl;
	return 0;
}.

// Doesn´t work into Visual Studio
#include <iostream.h>

main()
{
    cout << "Hello World!";
    return 0;
}

// Errors:
error C1083: Cannot open include file: 'iostream.h
IntelliSense: cannot open source file "iostream.h
IntelliSense: identifier "cout" is undefined	
 
Header file iostream.h does not exist in C++, it is called iostream.
Does not exist any more. In ancient times the C++ library had header files with *.h extension, so ancient C++ compilers had them. Hence the possibility to stumble on old code samples that need porting in order to compile them.
Notepad++ is not a compiler ;)
Topic archived. No new replies allowed.