I've started reading the IGAD tutorial yesterday and got to part 8 today. I understand how pointers work, though the assignments at the bottom are quite confusing..
First of all:
1. Draw a dotted line (skip every other dot) from (0, 0) to (400, 400). Do not use the Plot function, use a pointer variable instead. Figure out what the distance between dots in memory is to make this code super simple and fast.
How would I go about doing that and how would it be faster and 'simpler' than this:
for ( int i = 0; i < 400; i++ ){
if( empty ){
empty = false;
}else{
m_Screen->Line( (float) i, (float) i, (float) i, (float) i, 0xffffff );
empty = true;
}
}
2. Does the second assignment also require me to use pointers?
Thanks!












