Re: [Libphidget-devel] At loss with C... - fixed
Status: Alpha
Brought to you by:
jstrohm
|
From: Jack S. <js...@ja...> - 2002-09-07 21:57:00
|
On Sat, 2002-09-07 at 16:51, Vadim Tkachenko wrote:
> According to Jack Strohm:
>
> > > Yep, it was a C++ artifact - the declaration block should've been before the
> > > code...
> >
> > What do you mean?
>
> C requires *all* the variable declarations to go before the code, so now it
> looks like this:
>
> int t,count;
> struct phidget **phidgets;
>
> printf("----------------------------------------\n");
> printf("Phidgets Device driver test.\n\n\n");
>
> // Initialize libphiget, here is where the devices are actually retrieved by the library
> // We want the library to handle signals (passing it 1)
> phidgetInit(1);
>
> // Get an array of pointers to phidgets and a count of available phidgets
> phidgets=phidgetGetPhidgets(&count);
>
ahhh, man I'm getting senile, of course. Wonder why it's been compiling
for me?
|