Skip to content

bonhamdaniel/c-plus-plus-basics

Repository files navigation

c-plus-plus-basics

Simple C++ programs demonstrating the basics of the language.

The repository includes the following solutions:

  1. words-in-file: WordsInFile.cpp, 13File.txt, 80File.txt, WCFile.txt, and README.md - opens a file, counts the # of whitespace-separated words in that file, and displays the result.
  2. display-on-prompt: DisplayOnPrompt.cpp, 13File.txt, 80File.txt, WCFile.txt, and README.md - opens a (text) file, and displays the contents of that file one line at a time. After a line has been displayed, the program waits for the user to press the '' key before displaying the next line in the file.
  3. vector-basics: VectorBasics.cpp and README.md - introduces the C++ concept of the vector and demonstrates a few of its associated functions.
  4. prime-numbers: PrimeNumbers.cpp and README.md - uses two nested for loops and the modulus operator (%) to detect and print the prime numbers from 1 to 10,000. Displays all the primes found.
  5. file-string-manipulation: FileStringManipulation, WCFile.txt, and README.md - introduces the C++ concepts of file and string manipulation, including the use of getline().
  6. abstract-data-types: DVDRentals.cpp, DVDRentalList.txt, and README.md - introduces the C++ concepts of abstract data types, as well as the data and operations associated with the data type, through the implementation of a DVD rental system.
  7. dynamic-storage: DynamicStorage.cpp and README.md - introduces the C++ concepts of dynamic creation of storage, deleting that storage, and shows the required memory for different types.
  8. nested-classes: NestedClasses.cpp and README.md - introduces the C++ concepts of classes, nested classes, constructors, destructors, and the deletion of clas objects.
  9. class-basics: ClassBasics.cpp, DVDRentalList.txt, and README.md - introduces the C++ concepts of classes, multiple constructors, member data and member functions, and the use of a class to perform file manipulation.
  10. ctime-basics: CTimeBasics.cpp and README.md - introduces the C++ concepts of consts, the ctime library and its functions, and timing the execution of a program.
  11. inline-functions: InlineFunctions.cpp and README.md - introduces the C++ concepts of inline functions, consts, the ctime library and its functions, and timing the execution of a program.
  12. operator-overloading: OperatorOverloading.cpp, and README.md (produces OpOv.txt) - introduces the C++ concept of operator overloading.
  13. inheritance-basics: InheritanceBasics.cpp and README.md - introduces the C++ concepts of class hierarchies, inheritance, abstract functions, composition, and other related topics.
  14. polymorphism-basics: PolymorphismBasics.cpp and README.md - introduces the C++ concepts of class hierarchies, inheritance, abstract functions, and polymorphism.
  15. template-basics: TemplateBasics.cpp and README.md - introduces the C++ concepts templates, iterators, nested iterators, and end sentinels.

About

Simple C++ programs demonstrating the basics of the language.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages