Search found 2 matches

by stange
Fri Mar 02, 2012 11:51 am
Forum: Coding Questions
Topic: Convert C++ code to PB
Replies: 3
Views: 1336

Re: Convert C++ code to PB

From the small piece of code you posted I cannot know what kind of data is CPhidgetTemperatureSensorHandle.

A integer (since it's say handle in the name) ? If it is so then I don't understand the memory allocation in PB.

Anyway the first thing I noticed is that *tmp is becoming tmp. Those are TWO ...
by stange
Fri Mar 02, 2012 12:46 am
Forum: Coding Questions
Topic: Convert C++ code to PB
Replies: 3
Views: 1336

Convert C++ code to PB

Hello!

I have such a code in C++, which I try to convert to PB, but something isn't right:

...

CPhidgetTemperatureSensorHandle temp = 0;

CPhidgetTemperatureSensor_create(&temp);

CPhidget_open((CPhidgetHandle)temp, -1);

if((result = CPhidget_waitForAttachment((CPhidgetHandle)temp, 2000 ...