![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Programmer
Join Date: Jul 2005
Posts: 66
Rep Power: 4
![]() |
Re: Simple if statement question :(
Hey, cool! Thanks a lot, that was very helpful. I couldn't help but catch the "bool" an and then the variable bCont after it.
What exactly is bool? I thought I would use "string" for that, simply because I was holding text characters in it. I'm also creating a small text based role playing game in C++ as for a a bit of practice. Will it be a problem posting the source in this thread as well? |
|
|
|
|
|
#12 |
|
Programmer
Join Date: Jul 2005
Posts: 66
Rep Power: 4
![]() |
Re: Simple if statement question :(
C++ Syntax (Toggle Plain Text)
|
|
|
|
|
|
#13 | |
|
hi: for(;;) goto hi;
|
Re: Simple if statement question :(
Quote:
bool is short for the boolean type which holds either a true or false value. bCont is always true unless the user fails to enter "Y" (or "y") in which case the loop stops.As for the function problem: in maingame() you've put stats() in as a prototype and not a regular call. Take out the void part and it'll work. I love abusing this icode tag.I highly recommend you tackle some more learning materials for C++ before starting something like an RPG. Since this is C++, I'll tell you now before someone else does that you probably want to learn about classes. Also you should consider a code-oriented text editor; your wacky spacing (no offense) will probably become the source of some issues that are hard to solve.
__________________
How do you play Religious Roulette? Stand around in a circle and blaspheme till someone gets struck by lightning. |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| very simple question. make button change number in edit box | nickm | Delphi | 2 | Apr 29th, 2006 10:47 PM |
| A simple programming question | punter | C# | 8 | Jan 5th, 2006 4:04 PM |
| A simple question | Master | C++ | 9 | Dec 24th, 2005 2:20 PM |
| Simple c# question | nez | C# | 8 | Jul 1st, 2005 6:29 PM |
| Simple (stupid cause I don't know it) basic question | massive-war | C++ | 17 | Apr 11th, 2005 11:03 PM |