Search:

Type: Posts; User: TomServo1

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    2,737

    Thanks, that got rid of the segfault. I'll try...

    Thanks, that got rid of the segfault. I'll try to look into some pointer arithmetic, too.
    I coded that function with 2 for loops because I thought it was the easiest way to show exactly what was...
  2. Replies
    7
    Views
    2,737

    There aren't any other malloc calls than the one...

    There aren't any other malloc calls than the one I showed. It's supposed to execute only once, with WM_CREATE. The value that's returned by AllocatePoints() goes into a global pointer, so it should...
  3. Replies
    7
    Views
    2,737

    GRID_DETAIL is 10, and GRID_POINT_SIZE is...

    GRID_DETAIL is 10, and GRID_POINT_SIZE is sizeof(struct GridPoints)

    I get the segfault even if I don't cast malloc().
    I doubt that
    MainhWndInfo.rcClient.right / GRID_DETAIL
    would have a...
  4. Replies
    7
    Views
    2,737

    Mysterious memory allocation problem

    Hi. I'm trying to write a Windows program that draws a grid on the screen using Dev-C++ 4.9.9.2. So, I made this struct to represent each grid coordinate:



    struct GridPoints
    {
    SHORT x;...
Results 1 to 4 of 4