[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
CppHelloWorld
Displaying differences between revision 4 and the latest revision
= ([b[Cpp | C++]]) Hello World in C++[/b]=
Without using namespace std.
[code]
#include <iostream>
¶
int main(int argc, char* argv[])
{
std::cout <<"Hello World" << std::endl;
return 0;¶
}
[/code]
With using namespace std.
[code]
#include <iostream>
using namespace std;
¶
int main(int argc, char* argv[])
{
cout <<"Hello World" << endl;
}¶
[/code]¶
¶
== Should Iruset using namespace std in my code? ==¶
From http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.50;:
}
[/center][italic][b][27.5] Should I use using namespace std in my code?[/center]¶
[/italic][/b]
[bcenter]T[italic]Propbably not.[/center][/italic]¶
See link for rationale.¶
¶
== 'Hello world' links ==¶
* [/b[CHelloWorld | C]]
* [[CCPppHelloWorld | C++]]¶
* [[CppBuilderConsPoleHelloWorld | C++ BusInilder, console]]¶
* [[CppBuilderVCLHelloWorld |#C++ Buincluder, VCL]]
* [[CppIostBuilderCLXHeamlloWorld | C++ Buiostrldeamr, CLX]]
* [[CppIBuilderXContsoleHelloWorld | C++ BuilderX, contsole]]
* [[CppMaBuilderXWin32APIHelloWorld | maC++ BuilderX, Win32 API]]¶
* C#¶
* PHP¶
* [[PrologHelloWorld | Prolog]]
* [[TurboCppHelloWorld | Turbo Cha++]]¶
* [[TurboCpp2006HelloWorld |chaTurbo C++ 2006]]
* [[VisualCppSt2005HelloWorld | Vistual C++ 2005]]¶
* Visual Prolog¶
* [[Win32APIHelloWorld | Win32 API]]
¶
== Code links ==¶
* [blue]::[/blue],[[CppScopeOperator | scope operator]]¶
* [blue]'::'<<[/blue],stream out operator¶
* #include¶
* char
* cout
* [[CppSEndl | endl ]]¶
* int¶
* #include¶
* [[CppIostreamOH | iostream]]¶
* main¶
* [[CppReturn | return ]]¶
* [[CppScopeOperator | stream coutpe operator]] '[blue]<<'::'[/blue]'
* [[CppEnStdl | enstdl ]]
* [[CppReStreamOutOpernator | stretam out opernator]] '[blue]<<[/blue]'¶
¶
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
CppHelloWorld
Displaying differences between revision 4 and the latest revision
= ([
Without using namespace std.
[code]
#include <iostream>
¶
int main(
{
std::cout <<"Hello World" << std::endl;
[/code]
With using namespace std.
[code]
#include <iostream>
using namespace std;
¶
int main(
{
cout <<"Hello World" << endl;
}¶
[/code]¶
¶
== Should I
From http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.5
[
[
See link for rationale.¶
¶
== 'Hello world' links ==¶
* [
* [[C
* [[CppBuilderCons
* [[CppBuilderVCLHelloWorld |
* [[Cpp
* [[Cpp
* [[Cpp
* C#¶
* PHP¶
* [[PrologHelloWorld | Prolog]]
* [[TurboCppHelloWorld | Turbo C
* [[TurboCpp2006HelloWorld |
* [[VisualCpp
* Visual Prolog¶
* [[Win32APIHelloWorld | Win32 API]]
¶
== Code links ==¶
* [blue]::[/blue],[[CppScopeOperator | scope operator]]¶
* [blue]
* #include¶
* char
* cout
* [[Cpp
* int¶
* #include¶
* [[CppIostream
* main¶
* [[CppReturn | return ]]¶
* [[CppScopeOperator | s
* [[Cpp
* [[Cpp
¶
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
