what do you mean by if the statment is true or false what does that mean?
and why do you insert { } these alot r they needed if so what do they do?
thanks
elaborate
Re: elaborate
If statement looks up if the statement inside () is correct or incorrect; true or false.
the {} just points out the program from where to what you want it to do something.
Example:
In English that says:
"If 'a' is 1, then do whatever is between {}, but else, if 'a' is not 1, then do what ever is between the next {}"
the {} just points out the program from where to what you want it to do something.
Example:
Code: Select all
int a = 1;
int b;
int c;
if (a == 1) // Asks if 'a' is '1'
{
b = 2; // If 'a' is '1' then do this
}
else
{
c = 4; // But if 'a' is not 1; if it's anything else but '1', do this
}
"If 'a' is 1, then do whatever is between {}, but else, if 'a' is not 1, then do what ever is between the next {}"
ʕ •ᴥ•ʔ
- magusofmirrors
- Posts: 56
- Joined: May 12th, 2012, 10:03 pm
Re: elaborate
I believe you should learn regular C++ programming first before tackling game programming. Go look at cplusplus.com 's tutorials. They teach C++ and programming pretty well there.
Edit: I see there are "regular C++ tutorials". I thought this was the link to regular programming to graphics and stuff. Guess I'll have to wait for that. Silly me.
Edit: I see there are "regular C++ tutorials". I thought this was the link to regular programming to graphics and stuff. Guess I'll have to wait for that. Silly me.
The admins are coming!!!
Re: elaborate
Yeah, the series I'm working on right now is a beginner C++ series. The only difference between this and other intro series is that this one starts off with a graphics framework instead of starting out using console/iostream/stdio calls.
Chili