Ah! I see it now. I was under the assumption that each of the four expressions were all checking for a collision, which didn't make sense, for all of them to return true. I see now that, in the...
Type: Posts; User: wtaplin
Ah! I see it now. I was under the assumption that each of the four expressions were all checking for a collision, which didn't make sense, for all of them to return true. I see now that, in the...
Hey guys, I've been going through this book about game programming and found a collision detection function that I just can't understand how it evaluates the expression and still works correctly. I...
Ahhh ok, I was making it more complicated in my head for some reason XD So, at the end of the loops, each element of g_iTiles will be set to 0. g_bTiles[0][0] == 0; g_bTiles[0][1] == 0; and so...
Hey guys, came across this in a book tonight. I think I understand it but I'd like to be sure.
BOOL g_bTileStates[4][4];
int g_iTiles[4][4];
for(int i = 0; i < 4; i++)
for(int j =...
Gettin' clearer now. Essentially, using char *s = "hello" puts "hello\0" out there in the computer's memory with 's' providing a way to find it and refer to it. The right to left tip really...
it's comin' togehter I think. char s[] = "Hello"; -- declares a string array that only leaves enough space for "Hello" and a null. char s[10] = "Hello"; -- declares a string array that has enough...
Ahh ok, I think I'm starting to grasp the concept. The book I'm going through hasn't introduced stack and heap memory yet, but now that I've looked it up it's starting to come together. At first...
I'm a little confused about the difference between using something like:
char s[] = "hello"
and
char *s = "hello"
rofl :D
Ahh it worked! Thank you, thank you : ) I'm not sure why the author left that out of the code, or more importantly why it works but I'm sure I'll get there eventually. Thanks again!
I didn't know special ed kids could get into engineering programs. What a D-bag.
The previous examples in the book dealt with files in text format, as opposed to binary format, and used the same method for opening a file. It also created the file to be opened so there was no...
Hi, I've been going through the book "C++ Without Fear" by Brian Overland and I've come across a problem with one of the examples. It's about opening a binary file, writing data to it, and closing...