GAME

IT IS JUST A SIMPLE GAME and A FUN TYPE JOKE [code language=cpp] /******************************************************* * MYCPLUS Sample Code – https://www.mycplus.com * * * * This code is made available as a service to our * * visitors and is provided...

UDP Sender and Receiver

Sender: This sample sends UDP datagrams to the specified recipient. The -c option first calls connect() to associate the recipient’s IP address with the socket handle so that the send() function can be used as opposed to the sendto() call. Compile: cl -o Sender...

Ping

This sample illustrates how an ICMP ping app can be written using the SOCK_RAW socket type and IPPROTO_ICMP protocol. By creating a raw socket, the underlying layer does not change the protocol header so that when we submit the ICMP header nothing is changed so that...

graphics

This is the graphics.h header file which contains all the graphics functions and their implementations. It is quite nice to have a look at header files just to know more about functions and their parameters. Also it tells about different structures, enums defined in...

Print pyramids and diamonds shpaes in C language

I have been receiving lot of emails and requests through the forums and inline forums attached to the tutorials about how to print pyramids and diamonds in different formats. So I have written this article to demonstrate how you can print pyramids and diamonds using...

Brick Game

This is the complete source code of the most favourite flash game ‘Web Breaker’. The source code is written completely in C/C++ programming language. The game runs in DOS graphics mode. You can use either Turbo C++ compiler or Dev C++ compiler to compile...

Shortest Path

This program finds the shortest path between two cities, provided that the map of the two cities and the distances are provided.   Shortest Path (109.7 KiB, 9,089...

PC to PC Communication

PC to PC Communication via RS232 port. Chat with only 3-wire connection. This program is tested with Turbo C++ editor Version 3.0. How ever, authors are not responsible for any damages that may happen to your computer. Please contact us if any problem exits....

My Piano

MyPiano 3.0 is a simple piano developed in C++ using graphics functions.By using this piano,user can play,record music etc. This is the third version of GPiano1.1.exe Exciting New Features: Improved Graphics Quality Mouse enabled window controls Ease of use Windows...

Automated system for Bank Management

This is an automated system for Bank Management. It uses files to handle the daily transactions, account management and user management. Nice graphical layout and mouse functionality. Manager can add, edit and delete the users and manage the user accounts. C...

Examples and use of Functions

Examples of function declarations, definitions, and use [sourcecode language=’cpp’] /******************************************************* * MYCPLUS Sample Code – https://www.mycplus.com * * * * This code is made available as a service to our * *...

Reading Text Files

It contains a program that is given as command parameter the name of a text file, say, temp.dat. It will read each line of temp.dat and print out in correspondence the number of characters and words on that line. At the end it will print out the number of lines that...

Playing with addresses of variables and their contents

Playing with addresses of variables and their contents: what is done by C with variables, addresses, and values. [sourcecode language=’cpp’] /******************************************************* * MYCPLUS Sample Code – https://www.mycplus.com * *...

Fly away to your vacation

The object of the game is to get to your proper plane on time so you can fly away to your vacation. Of course there a few obstacles and problems along the way and they will be brought up at the appropriate time. It will be up to you to solve the puzzles associated...

Directory Structure

A small script to show all the Directories and Files in a specified Drive or Directory. It shows all the files/folders in a tree with the file size, last modified and other file attributes. It is just like the DIR/P command of the DOS. [sourcecode...

Calculate the SUM

This C Language program reads a sequence of positive integers from the console, given by the user, and prints them out together with their sum. Use a Sentinel value (say 0) to determine when the sequence has terminated. So wehenever the user will enter 0 the program...

Copying one file into another

Similar to Unix’s cp command. This program will be called with two parameters, the names of two files. It copies the second to the first. [sourcecode language=’cpp’] /******************************************************* * MYCPLUS Sample Code...

Borland C/C++ compiler Interface

This is a Borland C/C++ compiler Interface using the graphics.h library. This program uses many functions of graphics.h library provided by C Language. like line(), setcolor(), outtextxy() etc… You can play around with this code to learn how to make simple and...

Small Help Dialog

A small help dialog in DOS mode graphics. It can b used in any application for help purpose or showing messages to the user. It uses the ASCII characters to build the windows shpe and then I have used the gotoxy() function to place the cusror at that location to print...

Enumerated type variable

Example that uses an enumerated type variable. This example uses enumerated type is used in C++ in exactly the same way it was used in ANSI-C with one small exception, the keyword enum is not required to be used again when defining a variable of that type, but it can...