Getting started:
Related tutorials:
Getting started:
Related tutorials:
| /* Hello World program */ | |
| #include<stdio.h> | |
| main() | |
| { | |
| printf("Hello World"); | |
| system("pause"); | |
| return 0; | |
| } |
| #include <stdio.h> | |
| int main() | |
| { | |
| printf("hello, world\n"); | |
| } | |
| // Compile, then run `./a.out 1>stdout.txt 2>stderr.txt` | |
| // Then run `echo $?` | |
| // stdout.txt should contain "hello, world" |
| #include <iostream> | |
| int main() | |
| { | |
| std::cout << "Hello World!" << std::endl; | |
| return 0; | |
| } |
| /* | |
| include the input / output stream | |
| header file | |
| */ | |
| #include <iostream> | |
| /* | |
| Just telling that if you don't find | |
| reference to something then just look in | |
| std namespace, it may be declared there |
| #include <iostream> | |
| int main() | |
| { | |
| std::cout << "Hello, World!\n"; | |
| system("pause"); | |
| return 0; | |
| } |