views:

73

answers:

1

The android NDK supports c++, but does it support c++ classes?? If so can you give a simple example and the steps needed to implement the class with the java source.

+2  A: 

The android NDK supports c++, but does it support c++ classes??

Yes. It supports C++ classes. Classes are fundamental in the language, and the support for classes is implicit when they state that they support C++.

If so can you give a simple example and the steps needed to implement it.

Not sure what you mean by this. Implement what? Implement classes in C++ or implement C++ applications for Android?

aioobe
They do support c++. "The NDK allows you to implement parts of your applications using native-code languages such as C and C++" - http://developer.android.com/sdk/ndk/index.html
Will03uk
....thus they support C++ classes.
aioobe
...how though, I can't find out how...
Will03uk
How would you expect them to support C++ without supporting classes??
aioobe
C++ libarys and its not as easy as just creating a c++ application because when you use c with the ndk it needs special names and parameters.
Will03uk