Hello World - differences between Visual Studio and NotePad++
Aug 20, 2015 at 6:48am UTC
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
Aug 20, 2015 at 7:03am UTC
Header file iostream.h does not exist in C++, it is called iostream .
Aug 20, 2015 at 8:48am UTC
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.
Aug 20, 2015 at 10:39am UTC
Notepad++ is not a compiler ;)
Topic archived. No new replies allowed.