ooops!
that's what I get for posting code without checking for stupidity.
Your compiler is getting angry because it's treating warnings as errors.
The casting warning appears because of this line:
Code:
vec[coordcount] = atof(mssgBuf);
atof() returns a double (see:
http://www.cplusplus.com/reference/clibrary/cstdlib/atof/ )
and I have vec[] defined as an array of floats.
I'll edit my original post, but you can just change every occurence of atof(...); to (float)atof(...);
"(float)" casts the double that atof returns into a float.
(more about casting:
http://www.cplusplus.com/doc/tutorial/typecasting/)
like this:
Code:
if(coordcount < 3){
vec[coordcount] = (float)atof(mssgBuf);
}
Your other question: yes, you should make an OSC parser node. I've built two flownodes so far. A UDP client node that can send and receive messages and a message parser node that converts received messages into meaningful data (3D vectors).
You can just re-use the UDP client flownode if you only want to receive. If you want to make it send OSC, you'll have to change that too.
If I would want to create an OSC parser flownode I'd start by searching the web for an existing C++ OSC parser and then try to make a flownode with it. I'm pretty sure there must be an OF implementation flying around in cyberspace :-)
good luck with learning this stuff! OpenFrameworks is a great library to learn C++.
best,
tim.