I'm taking intro to c++ and i am not very fond of the programming aspect of video game making ... doing to assignment which is kicking my ass ... i was wondering if anyone would be nice enough to help me answer a few of these questions ... please!!!!
Replies
... A line that begins with a '#' Character is a ________?
seriously i have no idea ... another question is ...
A '<<' is an _______?
thnx bro
whats wrong with this code
int x=0
while(x){
++x;
cout<<x<<endl;
}
more info here: http://msdn.microsoft.com/en-us/library/7e3a913x(VS.80).aspx
2: The Bitshift operator. Used to shift bits, i never use it in that fashion because i don't have to. It is overloaded though for the stringstream and filestream classes.
Then it is used like this:
int i = 10; //On the stack
tstring text; //On the stack
tstringstream buffer; //On the stack
buffer << i; //Put the int in the stringstream
buffer >> text; //put whatever is in the buffer in text
http://en.wikipedia.org/wiki/Bitwise_operation
3: I'm not sure how to answer this. I would Enum in the empty space of that scentence.
An Enum is used like a collection of following or suiting terms.
enum Suit {
Diamonds,
Hearts,
Clubs,
Spades
};
Each of these terms is actually an unsigned int and i'm pretty sure you can use increment and decrement operators on them (when in range). This means Diamonds = 0, Hearts = 1 etc. The names are there so you actually know what it's about They are most commonly used in combination with the switch structure but are suited for more uses.
A good example is the last one on this page: http://msdn.microsoft.com/en-us/library/2dzy4k6e.aspx
4: The while takes a condition, it should be something like:
int x=0; // Don't forget ;
while(x < 10){
++x;
cout<<x<<endl;
}
I feel like i'm doing your homework atm. I like to help but your questions don't seems like you were really writing code and having a problem.
http://www.google.com/
But technically MoP it looks like his homework includes research and he's just using polycount to dig up his information -- it's not exactly wrong, just lazy and a little shifty.
http://www.timeatlas.com/mos/5_Minute_Tips/General/Searching_with_Firefox_Keywords/
and if you use Opera you can already use it right away like: each time in your adress barand it will search fot it- its super fast that way - just hit
[ode][ctrl] + [T]
g polycount forum[
[enter]/code]
to search for the polycount forum. I answer like 60% of my forum stuff in regards of coding - the rest pure memeory - alot internet users dont know how to search propper the ones helping them in forums often do however know.