Saturday, April 17, 2010

I want to show you the things which can restrict you on thinking

 If you don't want that this come in place of google and BBC than plz comment it.
                          
                             Best of Luck!!!!!!!!!!!!!!

Bolgger

I want to say u that blogging is nothing in my point of view because they are not activating the new user blogs and if u cannot believing on me plz u must try it and comments on me if I am wrong.

2nd part of the project hospital management

struct doctor
{
       int Doc_ID;
       char doc_nam[20];
       int age_doc;
       char doc_gender;
       int room_assign;
       int timming;
       };

Hospital management

/*If you want to get full program please comment this program I will send you this full coding on your Email Id. Please write ur Id if you want really.*/
#include
#include
#include
struct patient
{
       int pat_no;
       char nam_pat[20];
       int age_pat;
       char sex_pat;
       char Disease[20];
       int dat_admit;
       int dat_discharge;
       int room_no;
       char tests[20];
       };

Monday, April 12, 2010

tick tack toe function for the first player



// THIS FINCTION IS DOING 2 TYPES OF WORK FOR "PLAYER 1"
// fIRST IT IS CHECKING THAT USER IS CHEATING OR NOT
// AND ALSO TAKING INPUT FROM USER AND SAVING IT ON USER DESIRED LOCATION.
int test1(int x)
{
n.score1=n.score1-10;
switch(x)
{
case 1:
if(A[0][0]==88 || A[0][0]== 42)
{
cheat1 ();
break;
}
else
{
A[0][0]=88;
break;
}
case 2:
if(A[0][1]==88 || A[0][1]== 42)
{
cheat1 ();
break;
}
else
{
A[0][1]=88;
break;
}
case 3:
if(A[0][2]==88 || A[0][2]== 42)
{
cheat1 ();
break;
}
else
{
A[0][2]=88;
break;
}
case 4:
if(A[1][0]==88 || A[1][0]== 42)
{
cheat1 ();
break;
}
else
{
A[1][0]=88;
break;
}
case 5:
if(A[1][1]==88 || A[1][1]== 42)
{
cheat1 ();
break;
}
else
{
A[1][1]=88;
break;
}
case 6:
if(A[1][2]==88 || A[1][2]== 42)
{
cheat1 ();
break;
}
else
{
A[1][2]=88;
break;
}
case 7:
if(A[2][0]==88 || A[2][0]== 42)
{
cheat1 ();
break;
}
else
{
A[2][0]=88;
break;
}
case 8:
if(A[2][1]==88 || A[2][1]== 42)
{
cheat1 ();
break;
}
else
{
A[2][1]=88;
break;
}
case 9:
if(A[2][2]==88 || A[2][2]== 42)
{
cheat1 ();
break;
}
else
{
A[2][2]=88;
break;
}
default:
{
cheat1 ();
}
}
}

Blocks 8.02 has been released!


Our long awaited release is finally here! Representing the hard work of 14+ developers for more 2+ years since our last official release (and many changes in the roadmap in between), it is finally made available to the general public.
For your convenience, we provide binaries for all platforms Code::Blocks supports:
  • Windows 2000 / XP / Vista
  • Linux (Ubuntu & Debian, 32 & 64 bits)
  • Mac OS X 10.4+
Binaries for other Linux distros will be made available in the following days. So, without further ado, head over to thedownloads section and get it while it's hot!
A new release is coming!
Monday, 18 February 2008 10:12
Catchy title, isn't it? And the best part is that it's true!
Our long awaited release is coming very soon. It's only a matter of few days. We only want to iron out a few issues with the installers and perform some administrative tasks before the release.
Stay tuned!

This is the display part of the game tick tack toe in C language


void display()
{
//--------------------------------------------------------------------
printf("\n");
printf( "\t\t\t -------------------------\n");
printf("\t\t\t | | | |\n");
printf("\t\t\t | %c | %c | %c |\n",A[0][0],A[0][1],A[0][2]);
printf("\t\t\t | | | |\n");
printf( "\t\t\t -------------------------\n");
printf("\t\t\t | | | |\n");
printf("\t\t\t | %c | %c | %c |\n",A[1][0],A[1][1],A[1][2]);
printf("\t\t\t | | | |\n");
printf( "\t\t\t -------------------------\n");
printf("\t\t\t | | | |\n");
printf("\t\t\t | %c | %c | %c |\n",A[2][0],A[2][1],A[2][2]);
printf("\t\t\t | | | |\n");
printf( "\t\t\t -------------------------\n");
printf("\n");
//--------------------------------------------------------------------
}

Intial of the game Tick tack toe


#include
#include
//using namespace std;
struct player
{
char name1[20];
char name2[20];
int score1;
int score2;
};

The open source, cross platform, free C++ IDE


Code::Blocks is a free C++ IDE built to meet the most demanding needs of its users. It is designed to be very extensible and fully configurable.

Finally, an IDE with all the features you need, having a consistent look, feel and operation across platforms.

Built around a plugin framework, Code::Blocks can be extended with plugins. Any kind of functionality can be added by installing/coding a plugin. For instance, compiling and debugging functionality is already provided by plugins!

We hope you enjoy using Code::Blocks!

Hello World,
My name is Bilal. Welcome to my blog.

Sunday, March 21, 2010

The open source, cross platform, free C++ IDE.

The open source, cross platform, free C++ IDE.

Application screenshotCode::Blocks is a free C++ IDE built to meet the most demanding needs of its users. It is designed to be very extensible and fully configurable.

Finally, an IDE with all the features you need, having a consistent look, feel and operation across platforms.

Built around a plugin framework, Code::Blocks can be extended with plugins. Any kind of functionality can be added by installing/coding a plugin. For instance, compiling and debugging functionality is already provided by plugins!

We hope you enjoy using Code::Blocks!

The Code::Blocks Team

Patch 2 for Mac OS X released
Friday, 21 March 2008 11:18

Apparently, the Mac OSX patch1 that was released just a couple of days ago was corrupted. For this reason, patch2 has been released for the same platform to rectify the problem.

If you have downloaded patch1 for Mac OS X, please download patch2. This time it should hopefully work.

We 're sorry for the inconvenience.

Patch 1 for Mac OS X released
Tuesday, 18 March 2008 11:58

Today we released Code::Blocks 8.02-p1 for Mac OS X.

Our Mac OS X compatibility guru, Anders F. Björklund, managed to pin-point some places inside wxMac (wxWidgetsversion for Mac OS X) that could cause some instability issues for Code::Blocks on that platform.

This new release should hopefully fix many of the stability problems encountered with the vanilla 8.02 release for Mac OS X. It contains changes to the bundled wxMac library, not to Code::Blocks' source code.

If you own a Mac, please give Code::Blocks a shot again with this new patch release and report back your findings (we 're mostly interested/focused on stability at this point).

Code::Blocks 8.02 has been released!
Thursday, 28 February 2008 18:34

Our long awaited release is finally here! Representing the hard work of 14+ developers for more 2+ years since our last official release (and many changes in the roadmap in between), it is finally made available to the general public.

For your convenience, we provide binaries for all platforms Code::Blocks supports:

  • Windows 2000 / XP / Vista
  • Linux (Ubuntu & Debian, 32 & 64 bits)
  • Mac OS X 10.4+

Binaries for other Linux distros will be made available in the following days. So, without further ado, head over to thedownloads section and get it while it's hot!

Version numbering scheme changed
Monday, 18 February 2008 09:38

After a discussion recently held between the core team members, it was decided to change the version numbering scheme used for Code::Blocks. The new scheme will follow the "Year.Month" style, also known as the "Ubuntu version scheme".

This means that our next release will be named as 8.02(February 2008). Yes, it's coming Real Soon Now™ !

A new release is coming!
Monday, 18 February 2008 10:12

Catchy title, isn't it? And the best part is that it's true!

Our long awaited release is coming very soon. It's only a matter of few days. We only want to iron out a few issues with the installers and perform some administrative tasks before the release.

Stay tuned!

Moved to new server
Monday, 18 February 2008 09:34

After more than 6 years, Code::Blocks is finally hosted on its own dedicated server!

The server is a powerful one, chosen to provide content efficiently and reliably, even under heavy load. Time will tell for sure, but we made sure from our part that everything was designed to handle heavy load.

We hope you enjoy surfing our sites now!

Saturday, March 20, 2010

Tick tack toe in C language

#include
#include
#include
//using namespace std;
struct player
{
char name1[20];
char name2[20];
int score1;
int score2;
};

char A[3][3] = {49,50,51,52,53,54,55,56,57};
int a=0,p=0,c,z=1,t=1,x,y,l=0,h=0;
FILE *fp;

void ahmed();
int test1(int);
int test2(int);
void test();
void display();
void cheat1();
void cheat2();
void display_about();
void display_rules();
struct player n;

void loop();
int main()
{
n.score1=100;
n.score2=100;
int play;
fp=fopen("score.txt","a+");
system("color f0");
display_about();
system("color 16");
display_rules();
system("color f0");
printf("Enter your choice");
printf("Press 1 for playing");
scanf("%d",&play);
if(l=1)
{
printf("Enter the first player name");
scanf("%s",n.name1);
printf("Enter the 2nd player name");
scanf("%s",n.name2);
loop();
ahmed();
printf("Hahaha");
fclose(fp);
fp=fopen("score.txt","r");
if(fp==NULL)
{
puts("cannot open");
exit(1);
}
else
{
rewind(fp);
while(fscanf(fp,"%s %d %s %d",n.name1,&n.score1,n.name2,&n.score2)!=EOF);
{
printf("%s %d %s %d",n.name1,n.score1,n.name2,n.score2);
}}
system("pause");
fclose(fp);

}
return 0;
}
void loop()
{
while(1)
{
h=0;
system("cls");
display ();
printf("%s\t",n.name1);
scanf("%d",&x);
test1(x);
test();
if (h==2)
continue;
l++;
if (p==1)
break;
if (l==5)
break;
int g=4;
while (g==4)
{
h=0;
system("cls");
display();
printf("%s\t",n.name2);
scanf("%d",&y);
test2(y);
test();
if (p==1)
break;
if (h==3)
continue;
else
g=6;
}
if (p==1)
break;
system("cls");
display();
}
}
void display()
{
//--------------------------------------------------------------------
printf("\n");
printf( "\t\t\t -------------------------\n");
printf("\t\t\t | | | |\n");
printf("\t\t\t | %c | %c | %c |\n",A[0][0],A[0][1],A[0][2]);
printf("\t\t\t | | | |\n");
printf( "\t\t\t -------------------------\n");
printf("\t\t\t | | | |\n");
printf("\t\t\t | %c | %c | %c |\n",A[1][0],A[1][1],A[1][2]);
printf("\t\t\t | | | |\n");
printf( "\t\t\t -------------------------\n");
printf("\t\t\t | | | |\n");
printf("\t\t\t | %c | %c | %c |\n",A[2][0],A[2][1],A[2][2]);
printf("\t\t\t | | | |\n");
printf( "\t\t\t -------------------------\n");
printf("\n");
//--------------------------------------------------------------------
}

// THIS FINCTION IS DOING 2 TYPES OF WORK FOR "PLAYER 1"
// fIRST IT IS CHECKING THAT USER IS CHEATING OR NOT
// AND ALSO TAKING INPUT FROM USER AND SAVING IT ON USER DESIRED LOCATION.

int test1(int x)
{
n.score1=n.score1-10;
switch(x)
{
case 1:
if(A[0][0]==88 || A[0][0]== 42)
{
cheat1 ();
break;
}
else
{
A[0][0]=88;
break;
}
case 2:
if(A[0][1]==88 || A[0][1]== 42)
{
cheat1 ();
break;
}
else
{
A[0][1]=88;
break;
}
case 3:
if(A[0][2]==88 || A[0][2]== 42)
{
cheat1 ();
break;
}
else
{
A[0][2]=88;
break;
}
case 4:
if(A[1][0]==88 || A[1][0]== 42)
{
cheat1 ();
break;
}
else
{
A[1][0]=88;
break;
}
case 5:
if(A[1][1]==88 || A[1][1]== 42)
{
cheat1 ();
break;
}
else
{
A[1][1]=88;
break;
}
case 6:
if(A[1][2]==88 || A[1][2]== 42)
{
cheat1 ();
break;
}
else
{
A[1][2]=88;
break;
}
case 7:
if(A[2][0]==88 || A[2][0]== 42)
{
cheat1 ();
break;
}
else
{
A[2][0]=88;
break;
}
case 8:
if(A[2][1]==88 || A[2][1]== 42)
{
cheat1 ();
break;
}
else
{
A[2][1]=88;
break;
}
case 9:
if(A[2][2]==88 || A[2][2]== 42)
{
cheat1 ();
break;
}
else
{
A[2][2]=88;
break;
}
default:
{
cheat1 ();
}
}
}

// THIS FINCTION IS DOING 2 TYPES OF WORK FOR "PLAYER 2"
// fIRST IT IS CHECKING THAT USER IS CHEATING OR NOT
// AND ALSO TAKING INPUT FROM USER AND SAVING IT ON USER DESIRED LOCATION.

int test2(int y)
{
n.score2=n.score2-10;
switch(y)
{
case 1:
if(A[0][0]==88 || A[0][0]== 42)
{
cheat2 ();
break;
}
else
{
A[0][0]=42;
break;
}
case 2:
if(A[0][1]==88 || A[0][1]== 42)
{
cheat2 ();
break;
}
else
{
A[0][1]=42;
break;
}
case 3:
if(A[0][2]==88 || A[0][2]== 42)
{
cheat2 ();
break;
}
else
{
A[0][2]=42;
break;
}
case 4:
if(A[1][0]==88 || A[1][0]== 42)
{
cheat2 ();
break;
}
else
{
A[1][0]=42;
break;
}
case 5:
if(A[1][1]==88 || A[1][1]== 42)
{
cheat2 ();
break;
}
else
{
A[1][1]=42;
break;
}
case 6:
if(A[1][2]==88 || A[1][2]== 42)
{
cheat2 ();
break;
}
else
{
A[1][2]=42;
break;
}
case 7:
if(A[2][0]==88 || A[2][0]== 42)
{
cheat2 ();
break;
}
else
{
A[2][0]=42;
break;
}
case 8:
if(A[2][1]==88 || A[2][1]== 42)
{
cheat2 ();
break;
}
else
{
A[2][1]=42;
break;
}
case 9:
if(A[2][2]==88 || A[2][2]== 42)
{
cheat2 ();
break;
}
else
{
A[2][2]=42;
break;
}
default:
{
cheat2 ();
}
}
}

//THIS FUNCTION IS TESTING THE INPUTS BY USERS TO GIVE RESULTS .
//THERE ARE 8 CASES AND IF ANY OF THEM FULFILED THAN IT GIVE RESULTS.

void test()
{
if(A[0][0]==A[1][1] && A[0][0]==A[2][2])
{
if (A[0][0]==88)
{
t=2;p=1;
}
else
if (A[0][0]==42)
{
z=2;p=1;
}
}
else
if(A[0][2]==A[1][1] && A[0][2]==A[2][0])
{
if (A[0][2]==88)
{
t=2;p=1;
}
else
if (A[0][2]==42)
{
z=2;p=1;
}
}
else
if(A[0][0]==A[0][1] && A[0][0]==A[0][2])
{
if (A[0][0]==88)
{
t=2;p=1;
}
else
if (A[0][0]==42)
{
z=2;p=1;
}
}
else
if(A[1][0]==A[1][1] && A[1][0]==A[1][2])
{
if (A[1][0]==88)
{
t=2;p=1;
}
else
if (A[1][0]==42)
{
z=2;p=1;
}
}

else
if(A[2][0]==A[2][1] && A[2][0]==A[2][2])
{
if (A[2][0]==88)
{
t=2;p=1;
}
else
if (A[2][0]==42)
{
z=2;p=1;
}
}
else
if(A[0][0]==A[1][0] && A[0][0]==A[2][0])
{
if (A[0][0]==88)
{
t=2;p=1;
}
else
if (A[0][0]==42)
{
z=2;p=1;
}
}
if(A[0][1]==A[1][1] && A[0][1]==A[2][1])
{
if (A[0][1]==88)
{
t=2;p=1;
}
else
if (A[0][1]==42)
{
z=2;p=1;
}
}
if(A[0][2]==A[1][2] && A[0][2]==A[2][2])
{
if (A[0][2]==88)
{
t=2;p=1;
}
else
if (A[0][2]==42)
{
z=2;p=1;
}
}
}

// ITS A FUNCTION TO AVOID CHEATING BY USER 1 AND TO HELP ANOTHER FUNCTION.
// I HAVE MADE THIS FUNCTION TO AVOID PASTING ALL THESE LINES AGAIN AND AGAIN.
void cheat1()

{
h=2;
system ("cls");
display ();
printf( "INVALID ENTRY!\nTRY AGAIN!\n");
system("pause");
}

// ITS A FUNCTION TO AVOID CHEATING BY USER 2 AND TO HELP ANOTHER FUNCTION.
// I HAVE MADE THIS FUNCTION TO AVOID PASTING ALL THESE LINES AGAIN AND AGAIN.

void cheat2 ()
{
h=3;
system ("cls");
display ();
printf( "INVALID ENTRY!\n");
system("pause");
}

void display_about()

{

printf( "\n\n\n\t BILAL AHMED \t\t\t\n");
printf( "\n\n\n\n");
system ("pause");
system ("cls");
}

void display_rules()
{
printf("\n\n\n\n1=> YOU CAN ONLY USE INTEGARS NO CHARACTERS ARE ALLOWED.\n");
printf( "2=> PLAYER 1 SIGN IS \" X \" \n");
printf( "3=> PLAYER 2 SIGN IS \" * \" \n");
printf("4=> YOU JUST HAV TO CHOSE LOCATION BY ENTERING INTEGARS");
printf( " \n\n\n \t\t\t\tTHANK YOU\n\n\n\n") ;
system ("pause");
system ("cls");
}
void ahmed()
{
char temp;
if (t==2)
{
system("color 0e");
system("cls");
display();
printf("\n\t\t\t\t%sWin\t\t\n\n",n.name1);
n.score2=0;
fprintf(fp,"%s\t%d\t%s\t%d\n",n.name1,n.score1,n.name2,n.score2);
system("pause");
}
else
if (z==2)
{
system("color 0a");
system("cls");
display();
printf("\n\t\t\t\t%s WIN\n\n\n",n.name2);
n.score2=0;
fprintf(fp,"%s\t%d\t%s\t%d\n",n.name1,n.score1,n.name2,n.score2);
system("pause");
}
else
{
system("color 09");
system("cls");
display();
printf("\t\t\t\tDRAW\n\n\n");
fprintf(fp,"%s\t%d\t%s\t%d\n",n.name1,n.score1,n.name2,n.score2);
printf("Sorry you have no idea how to play");
system("pause");
}
}