| | |
How do i create a simple game using c++??
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
•
•
Originally Posted by ze_viru$
I've just started learning c++,so i want to take any challenge concerning c++.My question is where do i start when drafting a game program.Please ppl help me out.
•
•
Join Date: May 2004
Posts: 217
Reputation:
Solved Threads: 0
inscissor is right, start simple. I have made the guessing game, take a look at virus, it should help you
here is the simple guessing game!
same thing but with voids
here is the simple guessing game!
C++ Syntax (Toggle Plain Text)
#include <cstdlib> #include <ctime> #include <iostream> using namespace std; int main() { int randomnumber = 0; int userguess = 20; randomnumber = (rand()%10)+1; cout << "The random number has been generated! It is between 1 and 10! \n"; do { cout << "Please enter your guess" << endl; cin >> userguess; } while (userguess != randomnumber); cout << "YAY \n"; return 0; }
same thing but with voids
C++ Syntax (Toggle Plain Text)
#include <cstdlib> #include <ctime> #include <iostream> using namespace std; void guesser(); int main() { guesser(); return 0; } void guesser() { int randomnumber = 0; int userguess = 20; randomnumber = (rand()%10)+1; cout << "The random number has been generated! It is between 1 and 10! \n"; do { cout << "Please enter your guess" << endl; cin >> userguess; } while (userguess != randomnumber); cout << "YAY \n"; }
![]() |
Similar Threads
- Tutorial: Flash-XML Menu (Site Layout and Usability)
- Creating a good game (Game Development)
Other Threads in the C++ Forum
- Previous Thread: Need help with a function
- Next Thread: Unhandled Exception, Not sure Where
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer dll download dynamiccharacterarray email encryption error file forms fstream function functions game generator getline givemetehcodez graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings temperature template text text-file tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets







I have search almost all day. Can someone please post a link or something.