Question: How do I use my c++ knowledge to develop mobile apps.

I know practically nothing about 'smart' phones or ipads etc.
But android uses java doesn't it?
That sounds complicated. What about the iphone?
iOS uses Objective-C
well which use c++?
closed account (o1vk4iN6)
If you want simple and easy there's java.
I don't.

I want c++.

I already know it.
closed account (o1vk4iN6)
Well they are only beginning to add more C++ support for android and if you want to develop for another architecture don't expect it to be so simply to setup (unless your using java).

http://developer.android.com/sdk/ndk/index.html
are there any java programs that are as simple as:
1
2
3
4
5
6
//some java comments go here
//a couple of lines of java code
begin c program:
{
}end c program.
end java program. 

?
You mean to embed C/C++ in Java? I'm pretty sure you can't do that... Why don't you just give the Android NDK a shot? ( http://developer.android.com/sdk/ndk/index.html ) I'm sure it's easier than you think.
closed account (o1vk4iN6)
@wtf

I meant more so java runs on everything and requires no special treatment, unlike C++ code being compiled on two different compilers, they each have their own little differences. Just as the compiler for an android device would be different, although it may just use GCC or something.
Last edited on
well as stated in an above link you can have android programs partially written in c++. I was asking if by partially could you in theory have something as simple as like 2 lines of java followed by the c program: something like:
1
2
3
4
5
6
//some java comments go here
//a couple of lines of java code
begin c program:
{
}end c program.
end java program. 
Do you want to be a programmer or just a C++ programmer? If you know C++ reasonably well, it shouldn't be that difficult to pick up java.
Well in fact I would love to learn other languages including java. But I don't care much for the steep learning curve involved. Not only that I already have a c++ compiler etc, and my code is already complete. I just wanted a quick way to compile my c++ code into an executable to be able to distribute to iphones/androids etc.

I would still have to modify some of my not-so-portable-code anyway (mainly calls to Sleep() etc), but most of my code is (or SHOULD be) portable, I just felt that learning java just for basic stuff like an equivalent for cout and printf could end up being a waste of my time, considering after all I'm still gonna have to learn the iphone itself etc.

Any advice?

P.S. This is a cplusplus forum after all. Why all the encouragement to switch to java?
No one is saying to "switch" to java, just suggesting the right language for the job. You can use the android ndk if you insist on c++ but be aware it isn't intended for general application development but for critical components like drivers. I have no experience with iPhones so I can't comment on it.
what all would I need to use ndk? i tried looking at it yesterday but am missing administration rights here.
You need eclipse http://www.eclipse.org/downloads/ (you can use net beans, but they recommend eclipse), the SDK http://developer.android.com/sdk/installing.html and the NDK http://developer.android.com/sdk/ndk/index.html
From what I've read of the NDK (I've only used the SDK) it seems like it will be more work than learning some java. I picked up a book title Hello Android, it is a short book that walks you through developing a Sudoku game only cost me about $20US. That and the internet where all a classmate and I needed to write our first app with little to no previous java experience.
Last edited on
Topic archived. No new replies allowed.