Skip to main content

Posts

Minesweeper Game in C

Minesweeper Game in C language. This game is like a windows minesweeper game and I am giving you all the code for this game. You can easily understand the code if you are not a beginner. For beginners this code will quite hard to understand. Because in this code it contains mouse pointing function, graphics function, and so many other codes which makes it so hard to play and is a mind game. So play and enjoy it.   Click here for code Click for code

Make your own paint application in c and cpp

Paint application using simple turboc complier. Hello friends now make your own paint application or mini project in your simple c and cpp compiler. click to show the code for paint program

Draw House in c and cpp programming with graphics

Draw House in your c compiler with graphics. You can implement this source code on c compiler this code is very simple made up with some easy command like:  Delay, Setcolor, Line, Arc. initgraph function initializes graphics on the main program. initgraph(&gdriver,&gmode,"c:\\turboc3\\bgi"); & points to the address of Graphics drive and Graphics mode defined by gdrive and gmode, you can change these strings with your own string like: gd as short of gdrive. And gdrive also having a function named as DETECT , used to detect the modes and graphics code over the program. Code : #include<iostream.h> #include<conio.h> #include<graphics.h> #include<dos.h> void dda( float xa, float ya, float xb, float yb); void main() { clrscr(); int gdriver=DETECT,gmode; initgraph(&gdriver,&gmode,"c:\\turboc3\\bgi"); for(int i=16;i>=14; i--) { delay(900); setcolor(i); line(216,110,410,110); } for(int i1=16;i1>=14;

Rattle Snake Game

Rattle Snake Game in C and C++ Hello friends this is a simple projects on snake game. It is simply different from my first snake warz game. You can run this game in DOS BOX and TURBOC compilers. copy this code in your file... //Rattle Snake - A excellent snake game developed in c/c++. #include <graphics.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> #include <dos.h> #include <iostream.h> #include <fstream.h> #include <string.h> int main() {    int gdriver = DETECT, gmode, errorcode;    void *body,*food,*tail1,*tail2,*tail3,*tail4,*head1,*head2,*head3,*head4;    int x, y,X[5000],Y[5000],i=3, maxx,maxy,speed=100,bo=10,t[10],score=0,hscore=20;    unsigned int size;    char a='6',b,scor[4],hs[4];    int k=2,l,r1,r2,f=0,z=100,first=0,second=1;;    r1=300;    r2=350;    ifstream infile("c:\tc\bin\rattle.txt");    infile.getline(hs,4);    infile.close();    hscore = atoi(hs)

Balloon Shooting game in cpp

Balloon Shooting Game is a simple game using c and cpp features. You can easily learn and is easy to run because this game works in TURBOC compiler. The main features are included is  GRAPHICS and DOS commands. Basic commands used in this game : initgraph : initgraph is used to initialising of graphics mode in the program.                   ex. initgraph(&gm,&gd,"akshay"); here gm uses Graphics detect mode and gd points to graphics features to be used in program ans last is a string it may be any string like c://tc/bin etc.. setbkcolor : sets the current background color.    for ex. if you want to set background color to blue, you can call   setbkcolor(BLUE); or setbkcolor(1); getimage : saves a bit image of the specified region into memory. putimage : outputs a bit image onto the screen. settextstyle : sets the current text characteristics.     Declaration : settextstyle(int font, int direction, int charsize); outtextxy : displays a string a

How to make Antivirus In C++

Hello friends this article to the programmers who wants to makes some intresting softwares and there own applications like this antivirus program ...This antivirus program is for beginners and easy to understand.... lets come to learn Focus Points The main points behind searching an virus is identify the structure of the virus file. Step1 : Get a list of file folders that includes to scan. Step2 : Scan them one by one using char sample would be tagged as "Infected". Step3 : Delete this virus file, in case when u find them. In coding phase first u have to learn file handling and the new concept is system command. system command : executes dos commands within c++ program. It currently works to include sub directiories in the file. for coding goto :  Antivirus coding

Printf within Printf

Hello friends today I am sharing new concept of printf within printf. In this concept one printf demonstrating an other printf. Rule : Inner printf returns Length of string printed on screen to the outer printf   Printf inside printf in C : Example #include<stdio.h> #include<conio.h> void main() { int num=1342; clrscr(); printf("%d",printf("%d",printf("%d",num))); getch(); }   Output : 134241 Know How ? Firstly Inner printf is executed which results in printing 1324  This Printf Returns total number of Digits i.e  4 and second inner printf will looks like printf("%d",printf("%d",4)); It prints 4 and Returns the total number of digits i.e 1 ( 4 is single digit number ) printf("%d",1); It prints simply 1 and output will looks like 132441