C++ Program to solve the Quadratic Equation

This program will solve quadratic equations. It accepts coefficients of a quadratic equation from the user i.e. a, b and c and displays the roots. To compile the program name it quadratic_solver.cpp then type g++ -o quadratic_solver quadratic_solver.cpp You may need...

C++ “Hello World” Program

This is a simple “Hello World” C++ program to display “Hello World” text on the screen. Typically, the best way to learn programming is by writing code. The first program beginners write is “Hello World” which is often used to illustrate the syntax of a...

Add time using structures in C++

Write a program having a structure named Time which has three integer data items i.e. hour, minute and second. The task is to add the variables of the Time data type though a function void AddTime(Time *time1, Time *time2) which takes as arguments the addresses of two...

Common Text Transformation Library

Common Text Transformation Library, CTTL for short, is a set of C++ classes and functions to understand and modify text data. The library implementation is based on STL classes and algorithms. The library provides components for creating lexical analyzers making...

C++ Program to demonstrate Inheritance

This is a simple C++ Program to demonstrate Inheritance. Simpler methods in the classes have been changed to inline code to shorten the file considerably. In a practical programming situation, methods that are this short should be programmed inline since the actual...

C++ Program to demonstrate Function Name Overloading

This is a simple C++ Program to demonstrate Function Name Overloading. An example of function name overloading within a C++ class many_name is used in this program. The constructor is overloaded as well as one of the methods to illustrate what can be done in C++...

TIC-TAC-TOE Enhanced Version – C++

This is an enhanced version of Tic-Tac-Toe (TTT) game by adding one more row and column. Actually I have played this newer version of Tic-Tac-Toe (TTT) game on a video game. So, when I learnt C/C++ programming, it was my wish to program this game myself using C/C++....

IP configuration

This sample illustrates how to programmatically change an IP address for a specific network adapter on your machine. This program also demonstrates how to retrieve existing network adapter IP configuration information. IP configurations can be changed for a specific...

SWAT GAME

SWAT GAME C++ /******************************************************* * MYCPLUS Sample Code - https://www.mycplus.com * * * * This code is made available as a service to our * * visitors and is provided strictly for the * * purpose of illustration. * * * * Please...

Client and Overlapped Server and Server and ThreadServer

This program is a simple named pipe client that demonstrates the API calls needed to successfully develop a basic named pipe client application. When this application successfully connects to a named pipe, the message “This is a test” is written to the...

Car Race Game

This is a simple C++ program to make a car race game. It uses object oriented approach to generate different objects in the game such as using Car, Obstacle and Timer classes. The code draw objects using Graphics Mode by using initgraph() function. You have to reach...

Non-Trivial Class in C++

This date class is intended to illustrate how to write a non- trivial class in C++. Even though this class is non-trivial, it is still simple enough for a new C++ programmer to follow all of the details. C++ /******************************************************* *...