C++ Programming Code Examples C++ > Code Snippets Code Examples Virtual function from base and derived classes Virtual function in three level inheritance Virtual function: respond to random events Virtual functions accessed from pointer Virtual functions and polymorphism Virtual Functions and Polymorphism Virtual functions are hierarchical. Virtual Functions Are Hierarchical Virtual functions: interface class Virtual functions retain virtual nature when inherited. Virtual functions with person class Virtual members Virtual public inheritance While loop Demo While loop: two conditions While statement Word count for input file: file read with ifstream Work with heaps: make_heap from vector Wrap char pointer to a String class Write a character using cout Write function object Write numbers to a binary file and read them back Write string to a file Write strings to disk Write text to a file Write to file: ofstream Write unsigned char to a file and read it back Writes information inputted to a file Writing on a text file Writing to a File Your own Queue class Page 1 Page 34 Page 35