C++ examples (example source code) Organized by topic

C++
1. Bitset
2. Class
3. Console
4. Data Structure
5. Data Type
6. Deque
7. Development
8. File
9. Function
10. Generic
11. Language
12. List
13. Map Multimap
14. Overload
15. Pointer
16. Queue Stack
17. Set Multiset
18. STL Algorithms Binary search
19. STL Algorithms Heap
20. STL Algorithms Helper
21. STL Algorithms Iterator
22. STL Algorithms Merge
23. STL Algorithms Min Max
24. STL Algorithms Modifying sequence operations
25. STL Algorithms Non modifying sequence operations
26. STL Algorithms Sorting
27. STL Basics
28. String
29. Valarray
30. Vector
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
C++Screenshots 
> >
List
String
Vector
Set Multiset
Deque
List
list assign( 1 ) list begin end( 1 ) list const_iterator( 1 ) list display( 3 ) list erase( 1 ) list find( 2 ) 
list insert( 3 ) list iterator( 5 ) list merge( 2 ) list push pop( 5 ) list remove( 2 ) list reverse( 1 ) 
list sort( 2 ) list splice( 3 ) list swap( 1 ) list unique( 2 ) list( 8 ) 
String
string append( 2 ) string assign( 1 ) string at( 1 ) string char array( 1 ) string compare( 9 ) string concatenation( 2 ) 
string copy( 1 ) string data( 1 ) string empty( 1 ) string erase( 2 ) string find( 13 ) string insert( 3 ) 
string iterator( 3 ) string read( 1 ) string replace( 3 ) string resize( 1 ) string reverse( 2 ) string search( 1 ) 
string size( 4 ) string sort( 1 ) string subscript indexer( 3 ) string substr( 3 ) string swap( 1 ) string( 4 ) 
Vector
object vector( 1 ) vector at( 1 ) vector back( 2 ) vector begin end( 1 ) vector bound( 2 ) vector capacity( 2 ) 
vector clear( 1 ) vector compare( 2 ) vector count( 1 ) vector definition( 2 ) vector display( 2 ) vector erase( 3 ) 
vector find( 3 ) vector front( 2 ) vector indexer( 2 ) vector insert( 5 ) vector iterator( 4 ) vector push pop heap( 2 ) 
vector reserve( 1 ) vector reverse( 2 ) vector reverse_iterator( 1 ) vector size( 3 ) vector subscript indexer( 4 ) vector( 15 ) 
Set Multiset
multiset bound( 2 ) multiset count( 2 ) multiset equal_range( 1 ) multiset erase( 5 ) multiset find( 1 ) multiset insert( 3 ) 
multiset iterator( 1 ) multiset( 3 ) set begin end( 1 ) set bound range( 1 ) set compare( 1 ) set insert( 1 ) 
set( 4 ) 
Deque
deque display( 1 ) deque erase( 1 ) deque find( 2 ) deque indexer( 1 ) deque iterator( 2 ) deque pop( 1 ) 
deque push( 2 ) deque resize( 1 ) deque reverse( 1 ) deque size( 1 ) deque subscript indexer( 3 ) deque( 10 ) 
Bitset
Map Multimap
Valarray
Queue Stack
Bitset
bitset transform( 1 ) bitset( 1 ) 
Map Multimap
map compare( 2 ) map display( 1 ) map erase( 2 ) map find( 2 ) map insert( 1 ) map iterator( 3 ) 
map subscript indexer( 1 ) map update( 1 ) map( 8 ) multimap count( 1 ) multimap insert( 1 ) multimap interator( 1 ) 
Valarray
valarray cshift( 1 ) valarray indexer( 1 ) valarray min max sum( 1 ) valarray resize( 1 ) valarray slice( 1 ) valarray subscript indexer( 1 ) 
valarray( 7 ) 
Queue Stack
priority_queue( 5 ) queue( 4 ) stack( 8 ) your queue( 1 ) 
STL Basics
STL Algorithms Binary search
STL Algorithms Min Max
STL Basics
array algorithms( 8 ) array sort( 2 ) back_inserter( 2 ) binary_function( 1 ) container as parameter( 4 ) Function object( 1 ) 
Memory( 1 ) out_of_range exception( 3 ) parameter constraint( 1 ) predicate( 8 ) template Array( 2 ) 
STL Algorithms Binary search
binary_search( 3 ) equal_range( 4 ) lower_bound( 1 ) upper_bound( 2 ) 
STL Algorithms Min Max
max( 2 ) max_element( 3 ) min( 2 ) min_element( 3 ) 
STL Algorithms Heap
STL Algorithms Iterator
STL Algorithms Heap
make_heap( 3 ) pop_heap( 1 ) push_heap( 2 ) sort heap( 2 ) 
STL Algorithms Iterator
const_interator( 3 ) const_reverse_iterator( 1 ) custom iterater( 4 ) insert_iterator( 1 ) istream iterator( 6 ) iterator( 3 ) 
reverse_iterator( 1 ) template iterators( 2 ) 
STL Algorithms Sorting
STL Algorithms Merge
STL Algorithms Helper
STL Algorithms Sorting
custom comparer( 2 ) lexicographical_compare( 2 ) nth_element( 4 ) partial_sort( 4 ) partial_sort_copy( 2 ) sort( 9 ) 
stable_sort( 1 ) 
STL Algorithms Merge
includes( 3 ) inplace_merge( 3 ) merge( 6 ) set_difference( 2 ) set_intersection( 3 ) set_symmetric_difference( 3 ) 
set_union( 3 ) 
STL Algorithms Helper
accumulate( 4 ) adjacent_difference( 4 ) bind2nd( 2 ) distance( 2 ) divides( 1 ) gslice( 1 ) 
inner_product( 3 ) make_pair( 1 ) multiply( 2 ) negate( 1 ) next_permutation( 2 ) numeric_limits( 4 ) 
partial_sum( 3 ) prev_permutation( 3 ) slice( 1 ) 
STL Algorithms Modifying sequence operations
STL Algorithms Non modifying sequence operations
STL Algorithms Modifying sequence operations
copy( 13 ) copy_backward( 2 ) fill( 4 ) fill_n( 4 ) generate( 5 ) generate_n( 4 ) 
iter_swap( 2 ) partition( 1 ) random_shuffle( 4 ) remove( 4 ) remove_copy( 2 ) remove_copy_if( 3 ) 
remove_if( 2 ) replace if( 2 ) replace( 4 ) replace_copy( 2 ) replace_copy_if( 3 ) reverse( 4 ) 
reverse_copy( 3 ) rotate( 4 ) rotate_copy( 3 ) stable_partition( 2 ) swap( 4 ) swap_ranges( 4 ) 
transform( 10 ) unique copy( 7 ) unique( 3 ) 
STL Algorithms Non modifying sequence operations
adjacent_find( 4 ) count( 5 ) count_if( 1 ) equal( 3 ) find if( 4 ) find( 11 ) 
find_end( 2 ) find_first_of( 2 ) for_each( 6 ) mismatch( 4 ) search( 2 ) search_n( 2 ) 
Class
Overload
Generic
ClassScreenshots
Abstract Class( 2 ) Base Class( 4 ) Class Access( 1 ) Class Basics( 9 ) Class Member( 2 ) Constructor( 9 ) 
conversion Function( 2 ) Copy Constructor( 1 ) Derived( 3 ) Destructor( 7 ) Friend( 3 ) Inheritance Multiple( 3 ) 
Inheritance( 7 ) inline( 3 ) Instance( 1 ) Interface( 4 ) Polymorphism( 3 ) Private( 2 ) 
Protected( 3 ) Public( 2 ) Struct Class( 3 ) Union Class( 1 ) 
OverloadScreenshots
And( 1 ) Assign( 2 ) Boolean Operator( 2 ) Cast( 2 ) Comma( 1 ) Compare( 2 ) 
Divide( 2 ) Extractor( 3 ) Friend Plus( 1 ) Index( 5 ) Inserter Extractor( 1 ) Inserter( 7 ) 
Minus Minus( 2 ) Minus( 2 ) New Delete( 1 ) Parenthesis( 1 ) Plus Plus( 1 ) Plus( 2 ) 
Pointer Operator( 1 ) Product( 1 ) Return Operator( 1 ) Stream Operator( 1 ) Unary Operator( 1 ) Underflow( 1 ) 
GenericScreenshots
Generic Algorithm( 2 ) Generic Class( 3 ) Generic List( 1 ) Generic Queue( 1 ) Generic Stack( 2 ) Template Class( 1 ) 
Template Overload( 3 ) 
Console
Language
Development
ConsoleScreenshots
cin manipulator( 2 ) cin( 8 ) cout boolalpha( 2 ) cout custom( 6 ) cout fill( 2 ) cout flag status( 4 ) 
cout flag( 1 ) cout hex( 2 ) cout manipulator( 9 ) cout pcount( 1 ) cout scientific( 4 ) cout setf( 4 ) 
cout setiosflags( 3 ) cout setw setprecision( 4 ) cout sync clear( 2 ) cout terminator( 1 ) cout uppercase( 1 ) cout width( 3 ) 
cout( 4 ) ostream iterator( 1 ) 
LanguageScreenshots
Break( 2 ) Comments( 1 ) Const( 1 ) Do While( 3 ) For( 3 ) If( 8 ) 
Malloc( 1 ) Mod( 1 ) NameSpace( 7 ) New( 8 ) Operator( 10 ) Prefix postfix( 2 ) 
Register( 1 ) Static( 9 ) Switch( 3 ) this( 2 ) Throw( 3 ) try catch( 3 ) 
Using( 1 ) While( 8 ) 
DevelopmentScreenshots
Argv Argc( 1 ) const cast( 4 ) Dynamic Cast( 2 ) Escape Sequences( 3 ) Exception( 9 ) Mutable( 1 ) 
Random( 2 ) Reinterpret cast( 1 ) static cast( 2 ) Time( 2 ) typeid( 5 ) 
Data Type
Data Structure
Data TypeScreenshots
Bool( 2 ) Char( 8 ) Complex( 1 ) Date( 1 ) Decimal( 1 ) Double( 6 ) 
Float( 6 ) Hexadecimal( 5 ) Int( 7 ) Long( 1 ) Octal( 1 ) String( 21 ) 
Struct( 1 ) Union( 3 ) 
Data StructureScreenshots
Array Object( 8 ) Array Two Dimension( 4 ) Array( 7 ) Bitset( 1 ) Deque( 10 ) List( 35 ) 
Map( 15 ) Priority Queue( 4 ) Queue( 6 ) Set( 3 ) Sort( 1 ) Stack( 2 ) 
Valarray( 3 ) Vector Utility( 34 ) Vector( 34 ) 
File
Function
Pointer
FileScreenshots
Array Based IO( 3 ) File Convert( 1 ) File Read Write( 2 ) File Read( 6 ) File Status( 2 ) File Utility( 13 ) 
File Write( 3 ) fstream( 3 ) ifstream( 5 ) Object Serialize( 2 ) ofstream( 5 ) Stream iterator( 2 ) 
String Based IO( 1 ) String stream( 1 ) Text File( 5 ) 
FunctionScreenshots
Basics( 5 ) Function Adaptor( 3 ) Function Arguments( 3 ) Function Define( 1 ) Function main( 1 ) Function Overloaded( 7 ) 
Function Parameters( 10 ) Function Pointer( 2 ) Function Prototype( 2 ) Function Recursion( 1 ) Function Return( 3 ) Function Template( 5 ) 
Function Variables( 3 ) Optional Arguments( 1 ) Variable Scope( 2 ) Virtual( 9 ) 
PointerScreenshots
Auto Pointer( 1 ) Pointer Array( 6 ) Pointer Object( 4 ) Pointer Primitive( 11 ) 
pt>