- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 2
I AM NEW TO C++ ANYTHING ELSE!
- Interests
- C++ HAHAHA, football, computer games
- PC Specs
- WHO CARES! BUT IT SUCKS!
17 Posted Topics
can someone please explain me this piece of code //say getdetail() is a function declared above a.getdetail(); f.write((char *) & a,sizeof(a)); | |
Re: the gaming mother board i would suggest is ASRock Z77 Extreme4 [click here ](http://www.newegg.com/Product/Product.aspx?Item=N82E16813157293&nm_mc=AFC-C8Junction&cm_mmc=AFC-C8Junction-_-na-_-na-_-na&cm_sp=&AID=10446076&PID=6146836&SID=v7naztu6d6od) its pretty cool or i would suggest an nvidia produst for gaming. | |
Re: in simple language. cout = is used for the output of data from the computer. for example:- cout<<"Hello World"; this code will output Hello World on your screen and cin is used to take input from the user, like cout<<" What comes after a? "; cin>> abc; cin will store … | |
my code is showing some problem, what i want it to do is that when the user hits space a ^ is shot from the position of the user and it moves +1 along y axis. here is my code: x2 = x; y2 = y // x = 50 … | |
hello, so i am having some problem x = 50; y = 31; //declaration from line 1 to 5 lastx = x; lasty = y; while(1 == 1) { gotoxy(lastx, lasty); printf(" "); gotoxy(x,y); printf("**|_A_|**"); a = getch(); lastx = x; lasty = y; if (a == 77) x = … | |
So i have a code for a menu and i am facing some problem.. code:- do { ch = getch(); switch(ch) { case 'W': case 'w': system("CLS"); cout<<" MOD v1.0\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"; cout << " --> PLAY\n\n"; cout<<" HELP\n\n"; cout<<" EXIT\n\n"; break; case 'E': case 'e': system("CLS"); cout<<" MOD v1.0\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"; cout << … | |
So I have made a menu and a guy helped me, We have used enum in the menu is there anyother way i can do it, cause my teacher is not allowing me to use classes, files and arrays, please help, if u guys have anything simple and better i … | |
is there an easier way to write this code?? without using enum, enum MenuState{MenuPlay,MenuHelp,MenuExit}; MenuState ms=MenuPlay; char ch=0;//or anything other than '\r' while (ch!='\r')//IIRC getch returns '\r' when user hits enter { switch (ms) { case MenuPlay: cout<<"--> PLAY\n HELP\n EXIT\n"; break; case MenuHelp: cout<<" PLAY\n--> HELP\n EXIT\n"; break; case … | |
Hello, so i am making a shooter game, and i want the asteroids or '@' to spawn randomly along the y axis and fall down (- y axis per second) compiler:- codeblocks os:- win 7 thanks. | |
Hello, I am making a 2d shooter game, and I dont knnow how to make the player's ship move left and right with left and right arrow keys... please help me. I have to finish this project before 6th... please help | |
Re: use fstream @NathanOliver its a forum to help not make money ! | |
Re: if and else statements are conditional statements ... a basic programme is int x cout<<" enter your number"; cin>>x; if (x < 20){ cout<<" YAY"; } else if (x = 30){ cout<<"HOHOHHO"; } else { cout<<"QUACK!!"; } its a basic code main:- if:- if the condition is true it will … | |
hello again, so i want to make a programme where the file saved is saved with different names at every loop.. like at first loop it will save as file1.txt, 2nd loop file2.txt, so on... so this is my code... #include <iostream> #include <fstream> using namespace std; int main() { … | |
hello guys, i found a piece of code in the net.. this code is a progress bar loop programme. I am new to programming, and i am not able to understand this code. PLEASE can anyone explain it or tell a simpler version of it. thanks(sorry for my english) #include … | |
so i am new to c++ and my teacher told me to make a hotel management programme... well to make it more cool looking i wanna add those arror keys scroll selection this " --> " when press up key it goes to the first option, down to the other … | |
Re: here is a simpler version and easy to understand int compGuess = rand() % 100 +50; int highestNumber = 100; int lowestNumber = 50; // if you wanna change the numbers you can // its easier | |
The End.