Dissapointment

Is it true that with c++ you cannot create a operating system nor a mobile app for Apple,android
You can theoretically create an operating system with C++, and you definitely can create mobile apps for Apple and Android (unless I still don't understand what people have told me).
Last edited on
So its all a lie ?
I don't know what you're referring to.
Ohw misunderstandn. last question how do i knw the version am using of c++ i heard the is c++11 whats the diference
Different versions of C++ are called different standards. THe ones I know off the top of my head are C++98 (from 1998), C++03 (from 2003), C++11 (from 2011), and C++14 (which is expected to be released in 2014).

You can look in your compiler documentation to see which standards are supported and which standard is the default. A compiler might support C++11 but may by default use C++03 unless you tell it to use C++11. A common way on most compilers is to alter the command line:

g++ -std=c++11 *.cpp -o test.exe

As for what the difference is between C++03 and C++11, check out the Wikipedia article:
https://en.wikipedia.org/wiki/C%2B%2B11

C++11 added a lot of new content to C++, so compilers are still catching up. C++14 is mainly just coming to fix issues with C++11.
Last edited on
Am using code blocks so where should i check the dafault c++
In Code::Blocks, I can see which compiler I have in settings (top right, next to help) -> Compiler and debugger.

You can also edit in the options there which standard you want the compiler to follow.
Last edited on


Is it true that with c++ you cannot create a operating system nor a mobile app for Apple,android


(1) Is it true that you cannot create an OS with C++? No, although you would be advised to use Assembler in sections where speed is required.

(2) ... an app for Apple? Again partially not true. Although you would need to use Objective-C. You would also need to write you app to target Apple devices on a Mac; I use XCode which come free with OSX but you have to pay an annual developer licence to test on a real device and obviously release the app into the wild, althou you don't need the licence in the early stages of development. The front end would at least need to be in Objective-C but the back-end can be is pure C++ if you wish.

(3) ... an app for Android? Sorry, I have no experience of Android...

I hope that helps :-)
You can create android apps with Qt.
http://en.wikipedia.org/wiki/Qt_(framework)
Is it true that with c++ you cannot create a operating system


Not exactly.... You COULD try to make your own OS using c++ and probably you could do it, but c++ is not SUITABLE to make an OS, while C is a better choice in this case.

The problem is the "binary compatibility" of c++ object files ("Managing Access Points through modules" etc)

This is related to "C++ flexibility" -> Infact, unlike C, there is not a unique way to translate a c++ into an object binary file (and create an executable).... every compiler has its own way to do it, expecially when you use, for example, templates.

So... a binary created with c++ is more "compiler binded" than a binary created with c.

This means that if you, for any reason, will use a different compiler for a piece of your OS or you will use a different compiler to create an application (different one from the one used to build your own OS), you CAN encounter this problem: The application could be builded correctly, but when you run it you risk to see an error that forbid you to execute the application.

C++ could be not a good choice to make an OS also if you think about hardware / driver calls (mostly are all pointer calls and must happen low-level)..... Using C++ in order to develop your own OS could risk to make your OS not efficient.

----------------------------

The "Binary compatibility problem inside C++" is also explained well in this tutorial, where it is discussed about how to create a plugin framework (where, becouse of binary restrictions of c++, you will see you are invited to use a mix of C and C++).

http://www.drdobbs.com/cpp/building-your-own-plugin-framework-part/204202899

(You can limit your read of the first 2 pages of the Part1 I linked)

------------------------------------

About c++ and Android I would recomend Qt libraries too..... even if I never tried to make an Android application, I am sure it is a good suggestion
Last edited on
So the is a chance that i can do apps an OS if i include assembler and C
Think about linux.
Linux (including Kernel, bash, etc etc) is developed in C but you don't have any problem if you try to create and build a c++ application for Linux ^^

For example if you plan to make a game perhaps C++ is more suitable than C for your task ^^
closed account (o3hC5Di1)
I'm surprised nobody has mentioned HaikuOS: http://en.wikipedia.org/wiki/Haiku_%28operating_system%29
It is fully written in C++, but granted: it's not the most popular system out there. I'm not sure why though, everyone seems to think it's fast, so maybe it's just it's hard- and software support that's lacking.

As far as I know, QT5 promised to bring QT to both Android and iOS.

All the best,
NwN
Thax for your help guys
Topic archived. No new replies allowed.