Hi --
I'm trying to get the COG_X value, which I think should be an integer. I'm sorry, but I can't figure out what you're doing with all these pointers to characters.
This is my attempt to get the COG_X value
// get the cogx variable
char *result;
char *resultBuffer[16];
memset(resultBuffer, 0 ,sizeof(resultBuffer));
result = resultBuffer[0];
if (rr.getVariable("COG_X", result, 1)!=1)
{
printf("Error in GetVariable, did not return a result");
getchar();
exit(-1);
}
else
{
if (stricmp(result, "COG_X")!=0)
{
printf("Error in GetVariable");
getchar();
exit(-1);
}
}
It compiles, but gets a Windows error when it runs.
Please give me some guidance.
Thanks.
-- Robert
|
|