C++ Codes
Algorithms
Algorithm Analysis in C++
Beginners
Code Snippets
Graphics
Data Structures
File Manipulation
Games
Mathematics
Miscellaneous
Visual C++ Library
C++ > Code Snippets sample source codes
Another example of a conversion function
Another example of read() and write() and illustrates the use of gcount( )
Append two strings
Appending to the End of a File
Appending values to Vector Containers after sorting
Applying Generic Functions: A Generic Bubble Sort
Applying Template Classes: A Generic Array Class
Arithmetic assignment operators
Array based on int pointer
Array class for 10 int value with overloaded functions: +, -, ==
Array Initialization
Demonstrates the use of array of pointers.
Arrays of Objects
Ask for a person's name, and generate a framed greeting
Assign elements in vector a value through an iterator
Assign Items in int array to vector
Assign object1 to object2
Assign values using the member initialization syntax
Assigning and Displaying Array Values
Assigning deque objects.
Assigning function pointers to overloaded functions
Assigning sets to each other
Bad_alloc standard exception
Base class and derived class
Basic file operations: open and save
Basic file operations
Basic IO - Converts gallons to liters
Beginning and Ending Iterators of C-Style Arrays
Binary Files
Binary input and output with integers
Binary search a vector
Bit and, or and xor operations
Booleans in both formats
C++ break - The break keyword is used to stop a loop
C++ If-Else
As opposed to returning one, you can return a double-pointer.
C++ Returning a Reference
C++ for statement is typically used to count a number of items.
Calculate salary using static members.
Calculate sum of elements in a vector
Call constructor from base class
Call constructor from parent for three level extending
Call contructor from parent class
Call parent constructor and pass in parameter
Call parent constructors in multiple inheritance
Call parent virtual function
Call virtual function through object pointer
Calling base class's constructor in derived class
Cascade constructor and destructor call
Cast generic parameters
Catch By Non Const Reference
Catch char pointer type exception
Catch different types of exception
Catch exception from a function
Catch more than one type of exceptions
Catch out_of_range exception
Change contents of vector through an iterator
Change cout width and precision for string and float number output
Change the object pointer behaviour
Changing Case in Strings
Char array and char pointer
Char Escapes
Check file status
Check for mismatch between two vectors
Check status: EOF encountered, Non-Fatal I/O error, Fatal I/O error
Checking for a divide-by-zero exception.
Checking If Two Containers Are Equal with == operator
Checks for divide-by-zero and throw exception
Cin to read float in C++
Cin to read
Circumference and area of a circle with radius 2.5
Class array and object method call
Class as a return type
Class combination with private fields
Class combination
Class forward declaration
Class pointer and virtual function
Class to represent a book
Class with only public fields and methods
Class with setter and displayer
Classes and Structures are Related
Clear a vector
Combine insert and begin to add element to the start of a list
Combine insert and end to add elements to a deque
Combine insert and end to add elements to the end of a list
Combine insert and end to add elements to the end of vector
Compare sets with '==' operator
Compare string ignoring the case
Compare strings by index: string1.compare( 2, 5, string3, 0, 5)
Compare strings
Compare sub string: string4.compare( 0, string2.length(), string2 )
Compare two containers
Compare two vectors: !=
Comparing Pointer Addresses
complex number plus another complex number
Compound assignments
Compute area of a rectangle using default arguments.
Compute the difference
Compute the mean float mean with accumulate function
Compute the sample standard deviation
Previous Page (Page 1)
Next Page (Page 3)
Last Page (Page 14)
Privacy Policy
|
Link to Us
|
Links