Main Page
From ProgrammingExamples
Welcome to ProgrammingExamples.net!
This site is intended to provide short, compilable code snippets demonstrating frequently used concepts in several programming languages. Please feel free to modify the existing examples, and add new examples!
Contents
C++
- Alphabetize a vector of strings
- Pad a number with zeros
- Array
- 2D Array
- Binary input and output
- Execute a linux command
- Casting
- Character array
- Keyboard input
- Command line arguments
- Deep copy
- Default arguments
- Enum
- Exceptions
- Function pointer
- Infinity
- Logging
- Macros
- Namespaces
- NAN (not a number)
- Overload operator
- Parallel sort
- Random numbers
- StringStream
- Struct
- Switch
- Typedef
- Variable number of function arguments
I/O
Strings
Classes
- Class template
- Constructor inheritance
- Initialization list
- Derived class
- Down casting
- Friend class
- Nested classes
- Pure virtual function
- Singleton