loading
 
Accessing markers through API C++
Sudzzz from United States  [17 posts]
10 years
Hi,
I've a couple of errors trying to access markers through RR's API server in C++.
Heres my code. I have a marker Fill whose image output I would like to save.

if (rr.getImage("Fill", image, &width, &height, 320*240*3))
    {
        if (width*height*3>1280*1024*3)
        {
            printf("Fill image width/height error!");
            exit(0);
        }
        printf("Getting and saving image from Fill marker.\n");
        rr.savePPM("D:\\UP\\RoboRealm\\API\\testfill.ppm \n", image, width, height);
    }

Error : Run-Time Check Failure #3 - The variable 'len' is being used without being defined.
Anonymous 10 years
Sudzzz,

It looks like your compiler is complaining about a used variable 'len' without it being initialized. There is no len defined in the code that you pasted so the error is possibly somewhere else. Can you include the line number and source code of the line that the error is being generated from?

Alternatively, just initialize the len variable where it is defined. For example

int len;

should instead be

int len=0;

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index