Probably simple problem w/ RECT members
I'm trying to do what I thought would be as straightforward a task as there can be.
All I want to do is set up a bunch of RECT objects to use in a DrawText call.
But for some reason my program crashes, and this crash seems to have to do with assigning values to the RECT structures.
I'm not a C person so I don't use structures too often. And I've only been programming C++ for a few months. So here's the code:
When I comment out the assignments the program works fine. What am I doing wrong?
Re: Probably simple problem w/ RECT members
RECT *rctHeading; is a pointer....and if you dont assign a pointer to something, and then try dereference it, you'll be lucky not to crash
You could do;
RECT *rctHeading = new RECT;
that would allocate memory for the pointer to point to