>> ... don't use 100% of cpu, what do you mean by that?
Before, there was just a while(1) loop that did nothing but if() and printf(). The OS and CPU will gladly run that loop as fast as it can....
Type: Posts; User: Codeplug
>> ... don't use 100% of cpu, what do you mean by that?
Before, there was just a while(1) loop that did nothing but if() and printf(). The OS and CPU will gladly run that loop as fast as it can....
>> command *tuio_cmd[20]
That is a fixed size array of pointers to command. Not what you want.
Here is everything simplified, types, code, and tabs:
#include <stdlib.h>
#include <stdio.h>...
In my code editor, I turn off real tab characters and use nothing but spaces (editor inserts spaces when I hit tab). That will help keep your posted code looking the same as it does in your editor.
...
First......take a break ;)
When you come back, remove that "[20]" out of your typedef - that's making *my* head hurt!
typedef struct command_
{
int x, y, xo, yo, id;
} command;