• ### Announcements

#### Archived

This topic is now archived and is closed to further replies.

# sigh.........

## Recommended Posts

Fletch    122
Tricks Of WIN GP Gurus, anyone else have this book? I bought it and must say, i actually like it, but the problem is that there wasnt a real clear stressing between stupid little things like UCHAR and USHORT. Now in hindsight, i realize it should have been obvious, but when i was trying to create a 16bit surface using UCHAR video buffer pointer, obviously my code would only fill half my screen. This was quite a thorn in my side for a while and i couldnt understand the difference, or see the difference between his code and mine. Finally, when i got an access violation using the lock() function, i understood i needed to make sure all of my pointers would allow for the 16bit mode. These little problems seem to hold me back more than anything, and it''s frustrating to say the least. I get so discouraged when i spend hours on tiny bugs that should seem obvious, and probably are to most. Anyhow, the real point, and my question is... does anyone else ever experience these little bugs that slow your development to a halt?

##### Share on other sites
Ironblayde    130
Yeah, that book is great...

I know what you mean, though, about having to hunt through your code endlessly to figure out what in the hell is going wrong. It''s always so frustrating when it takes you two hours to find the problem and it turns out to be something stupid!

-Ironblayde
Aeon Software

##### Share on other sites
Guest Anonymous Poster
hehehehehehyeeheeh

I spent six hours over two days tracking down this:

  void CPacket:ack(const void* vp, long n) { length = n+sizeof(CPacket) - sizeof(data); //data = new char[n]; data = new char[n+1];//forgot to add one for termination data[n]=0;//this is frivilous too! memcpy(data, vp, n);//it doesnt get copied! serialnum = GenerateSerial(serialnum); ecc = GenerateECC(); }

it caused an assertion failure, and the debugger wasn''t terriblly helpful in locating the true source.