Monday, May 24, 2010

Need a C++ Project for CBSE 11?

CBSE Class 11,


Need a good program .





Please suggest website link or send me 1 if you have





Thank-You





It could be on any form , such as airline managemnt , banking , library. Just any one will do . Ty

Need a C++ Project for CBSE 11?
copy the code;


i have tried to make some thing like KBC.


you can edit the code and add more questions.


please send the code if any changes made.





#include%26lt;iostream.h%26gt;


#include%26lt;conio.h%26gt;


#include%26lt;dos.h%26gt;


#include%26lt;graphics.h%26gt;


#include%26lt;process.h%26gt;





/*


Made By Shashank Shastri


Mail Any Comments Or Doubts To sbs.shastri@gmail.com*/











/******************************


* *


* VARIABLES %26amp; FUNCTIONS *


******************************/





void q1();void q2();void q3();void q4();void q5();void q6();void q7();


void border();


void start();


void set1();


void right();


void wrong();








int x1=35;


int x2=355;


int y1=345;


int y2=415;


int i=0;


char ch;





/*********************************


* GRAPHICS *


**********************************/


void graphics()


{


int aq1=VGA,aq2=VGAHI;


initgraph(%26amp;aq1,%26amp;aq2,"c:\\tc\\bgi");


}








/***************************


* BORDER *


***************************/


void border()


{


setcolor(LIGHTBLUE);


line(0,322,640,322);


line(0,325,640,325);


line(0,470,640,470);


line(0,467,640,467);


line(2,325,2,467);


line(5,325,5,467);


line(639,325,639,467);


line(636,325,636,467);


line(0,395,640,395);


line(320,325,320,467);


setcolor(YELLOW);


settextstyle(0,HORIZ_DIR,1);


outtextxy(15,355,"A.");


outtextxy(335,355,"B.");


outtextxy(15,425,"C.");


outtextxy(335,425,"D.");


setcolor(WHITE);


setfillstyle(SOLID_FILL,RED);


fillellipse(480,80,30,20);


fillellipse(480,130,30,20);


fillellipse(480,180,30,20);


outtextxy(465,75,"50:50");


outtextxy(470,125,"POLL");


outtextxy(465,175,"PHONE");


rectangle(10,10,620,260);


rectangle(20,20,610,250);


floodfill(15,15,WHITE);


}





void set1()


{


setcolor(WHITE);


settextstyle(2,HORIZ_DIR,8);


}





void right()


{setcolor(RED);outtextxy(150,200,"RIGH... ANSWER");}








void wrong()


{setcolor(RED);outtextxy(150,200,"WRON... ANSWER");delay(2000);exit(0);}





void start()


{


setcolor(BLUE);


rectangle(10,10,620,460);


rectangle(20,20,610,450);


setfillstyle(SOLID_FILL,RED);


floodfill(15,15,BLUE);


setcolor(YELLOW);


settextstyle(10,HORIZ_DIR,3);


outtextxy(getmaxx()/2-170,getmaxy()/2-... TO KBC");


delay(2000);


}











/*************************************...


* *


* MAIN FUNCTION *


**************************************...


void main()


{


clrscr();


graphics();


start();


clearviewport();


border();


set1();


q1();


q2();


q3();


q4();


q5();


q6();


q7();


}





void q1()


{


outtextxy(15,280,"1.WHO IS FAMOUSLY CALLED BAPU?"); //1 QUESTION


settextstyle(7,HORIZ_DIR,2);


outtextxy(x1,y1,"GANDHI");


outtextxy(x2,y1,"DADDU");


outtextxy(x1,y2,"NEHRU");


outtextxy(x2,y2,"S.C.BOSE");


ch=getch();


delay(100);


if (ch=='a'||ch=='A')


{right();}


else


{wrong();}


delay(999);


}


void q2()


{ //2.QOUESTION


clearviewport();


border();


set1();


outtextxy(15,280,"2.WHICH BUILDING HAS THE LONGEST CORIDOR ? ");


settextstyle(7,HORIZ_DIR,2);


outtextxy(x1,y1,"AIRPORT");


outtextxy(x2,y1,"RAILWAY STATION");


outtextxy(x1,y2,"PARLIAMENT");


outtextxy(x2,y2,"RASTRAPATI BHAVAN");


ch=getch();


delay(100);


if(ch=='d'||ch=='D')


{right();}


else


{wrong();}


delay(999);


}


void q3()


{


clearviewport(); //3.QUESTION


border();


set1();


outtextxy(15,280,"3.WHO GAVE THE LAWS OF MOTION ?");


settextstyle(7,HORIZ_DIR,2);


outtextxy(x1,y1,"I.NEWTON");


outtextxy(x2,y1,"AVAGADRO");


outtextxy(x1,y2,"EINSTIEN");


outtextxy(x2,y2,"C.V.RAMAN");


ch=getch();


delay(100);


if (ch=='a'||ch=='A')


{right();}


else


{wrong();}


delay(999);


}


void q4()


{


clearviewport(); //4.QUESTION


border();


set1();


outtextxy(15,280,"4.PLANET THAT CAN BE SEEN WITH THE NAKED EYE? ");


settextstyle(7,HORIZ_DIR,2);


outtextxy(x1,y1,"MERCURY");


outtextxy(x2,y1,"VENUS");


outtextxy(x1,y2,"URANAS");


outtextxy(x2,y2,"JUPITER");


ch=getch();


delay(100);


if(ch=='c'||ch=='C')


{right();}


else


{wrong();}


delay(999);


}


void q5()


{


clearviewport(); //5.QUESTION


border();


set1();


outtextxy(15,280,"5.WHICH WEIGHS MORE 1kg IRON OR COTTON ?");


settextstyle(7,HORIZ_DIR,2);


outtextxy(x1,y1,"IRON");


outtextxy(x2,y1,"COTTON ");


outtextxy(x1,y2,"BOTH ARE EQUAL");


outtextxy(x2,y2,"NOTHING CAN BE SAID");


ch=getch();


delay(100);


if (ch=='C'||ch=='c')


{right();}


else


{wrong();}


delay(999);


}


void q6()


{


clearviewport(); //6.QUESTION


border();


set1();


outtextxy(15,280,"6.WHAT IS THE TENURE OF A GOVERNMENT ?");


settextstyle(7,HORIZ_DIR,2);


outtextxy(x1,y1,"2 YEARS");


outtextxy(x2,y1,"5 YEARS");


outtextxy(x1,y2,"7 YEARS");


outtextxy(x2,y2,"6 MONTHS");


ch=getch();


delay(100);


if (ch=='B'||ch=='b')


{right();}


else


{wrong();}


delay(999);


}


void q7()


{


clearviewport(); //7.QUESTION


border();


set1();


outtextxy(15,280,"7.HOW MANY WEEKS ARE THERE IN A YEAR ?");


settextstyle(7,HORIZ_DIR,2);


outtextxy(x1,y1,"52");


outtextxy(x2,y1,"50");


outtextxy(x1,y2,"51");


outtextxy(x2,y2,"53");


ch=getch();


delay(100);


if (ch=='A'||ch=='a')


{ right();cout%26lt;%26lt;"Great your Answer was Absolutely correct You have won nothing";}


else


{wrong();}


delay(999);


}
Reply:goto http://www.cplusplus.com/
Reply:so simple download this and rate me as the best answer f u like it








http://www.sourcecodesworld.com/source/L...

flower girl

I need a C++ header file... (DxLib.h)?

Does anyone know where I can get the header "DxLib.h" online? I can't find it in my normal library, but need it to compile some code.





From what I understand, I can download the code with DirectX, but since I have a Mac with XCode, that's not gonna work. If the file isn't freely avaliable online, if anyone has this and can put the code online, I would be eternally grateful (and would give you a best answer?).





If you can't upload online, send a copy to dragonlordals @ yahoo . com (remove spaces). Though, for security reasons, I'm not gonna actually open these files unless there's no alternative.

I need a C++ header file... (DxLib.h)?
search it on:


planet-source-code.com
Reply:donot worry


you can get a better project from an expert


from


http://homework.teamtutorial.com/


Need help in c programming?

Assume that you are required to enter a list of strings into a computer, rearrange them


in alphabetical order, and then print out the rearranged list. The strings must be stored


in a two-dimensional character array. Each string will be stored in a separate row


within the array. You may use any suitable string manipulation functions. One of the


library functions that can be used is strcmpi. Output : String 1: Apple


String 2: Ballroom


String 3: Black


String 4: Brown


String 5: Calendar


String 6: Canada


String 7: Island


String 8: News


String 9: Panda


String 10: Rainbow


String 11: END

Need help in c programming?
Use char *str[12];


or char str[12][256];


C++ for Dummies source code CD missing, where can I get the code?

I just took out the book from my local library but the cd in the back is missing does anyone know where I can get the source code I don't need the compiler I already have one its just I do not fancy typing out all that code.

C++ for Dummies source code CD missing, where can I get the code?
Go to www.course.com and use the code of the book in the back (or somewhere in the covers) to find your book and the corresponding download, most likely the cd is in that website.





By the way, I would still type the code if you are learning C++ if you have that chance, the learning quality will be much higher and solid than if you take the code. Try both methods by yourself and you will see.


C++ Programming?

what library do you have to include to use the PressEnter function?

C++ Programming?
#include%26lt;stdlib.h%26gt;
Reply:You Use The Computer !!!!!!!!!!!!!!!!!!!!!!!!!!!!


OR YOUR teacher!!!!!!!!!!!!!!!!!!!!!!!!!!

curse of the golden flower

C++ question?

Can someone explain to me how to use


the is_opened method in fstream library? I have a bit of problem with the syntax. The method would return true if the file can be opened or false if it cannot be. Can you give me an example. Thank you.

C++ question?
bool is_open ( );





Check if a file is open (fstream public member function)





Returns true if the stream is currently associated with a file, and false otherwise.





To determine this, the function calls: rdbuf()-%26gt;is_open()





The stream is associated with a file if either a previous call to member open succeeded or if the object was successfully constructed using the parameterized constructor, and close has not been called since.





Parameters:


none





Return Value:


true if a file is open, i.e. associated to this stream object.


false otherwise.


______________





Example:





// fstream::is_open


#include %26lt;iostream%26gt;


#include %26lt;fstream%26gt;


using namespace std;





int main () {





fstream filestr;





filestr.open ("test.txt");





if (filestr.is_open())


{


cout %26lt;%26lt; "File successfully open";


filestr.close();


}


else


{


cout %26lt;%26lt; "Error opening file";


}


return 0;


}








This example uses is_open to check whether the file has successfully been opened; If so, it writes a sentence to the file, otherwise it prints out an error message.








Basic template member declaration:





( basic_fstream%26lt;charT,traits%26gt; )


bool is_open ();








______________________
Reply:No, the method is for calling by a STREAM (i.e. is the stream pointing at a file, or not.





http://www.cplusplus.com/reference/iostr...
Reply:To tell the truth I doubt you ever need to use it. To check if a filestream is open you just need to do either





if (!myStream)





or you could do:





if( myStream.fail() )





hope this helps...


Help writing C language to write hexadecimal to decimal?

1. Read strings using a function you write called getStr ().





2. Write a function named hextodecimal () that takes in (only) a string parameter representing a positive hexadecimal number and return its decimal equivalent (integer). This function returns -1 if the string provided connotes to a negative number and/or is comprised of invalid characters.





-note: you may not use any library functions in this function- you must write all code necessary to enact the coversion and return the appropriate result.


-this function must accept both upper and lower case versions of the hex character.


-You may want to write an additional function that vets any string for invalid hex character

Help writing C language to write hexadecimal to decimal?
This should do to get you started. The reading strings is simple.





#include %26lt;unistd.h%26gt;


#include %26lt;stdio.h%26gt;





unsigned int hex2dec( char *s )


{


unsigned int v = 0;


char *p;





for( p = s; *p; p++ )


{


if( isdigit( *p ) )


v = (v * 16) + (*p - '0');


else


{


*p = tolower( *p );


if( *p %26gt;= 'a' %26amp;%26amp; *p %26lt;= 'f' )


v = (v * 16) + 10 + (*p - 'a');


else


return -1; /* assume illegal hex char */


}


}





return v;


}





main( int argc, char **argv )


{


printf( "%s converts to %u\n", argv[1], hex2dec( argv[1] ) );


}