Should I use C interface or can I use C++ classes directly?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Should I use C interface or can I use C++ classes directly?

Postby drawtree » Fri May 06, 2011 11:28 am

I'm reading tutorials. All descriptions are with C API, but I saw real implementation is done with C++.
C API is fine, but if there are C++ classes, it looks also good to use them.
Can I use C++ classes directly? Or is it not designed to be used in user code?
Eonil Hoon Hwangbo
An application developer for iOS / Mac OS X.
drawtree
 
Posts: 21
Joined: Thu May 05, 2011 5:11 am

Re: Should I use C interface or can I use C++ classes direct

Postby Julio Jerez » Fri May 06, 2011 12:26 pm

you can use the C++ interface of cource, it is way, way more flexible. newton is 100% written in C++

The only problem is that in some case in Impemnet funtionality in teh Newton.CPP shell,
it is very in very few faces, and you if you make you or subclass you cvna simpel copy the impelnetation.

but yes deffianitly you cna use newton C++.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Should I use C interface or can I use C++ classes direct

Postby drawtree » Sun May 08, 2011 2:28 am

Thanks!
I decided to use C API because they're a lot simpler, easier and cleaner. And also more friendly with objc :)
Eonil Hoon Hwangbo
An application developer for iOS / Mac OS X.
drawtree
 
Posts: 21
Joined: Thu May 05, 2011 5:11 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron