Have a jailbroken iPhone/iPad/iPod?
Want to compile C, C++ or/and Objective-C code?
On your device without internet?
Well I'm going to show you how, all credit goes to CoolStar
1. Open Cydia and change your setting to Developer
iPhone/iPod: Go to manage and click settings on top left corner
iPad: Go sources and top left corner
2. Search and install iOS Toolchain
3. install OpenSSH, iFile and Mobile Terminal
4. Go on to your computer and download the SDK.
Coolstar had provided the ios 7 sdk
http://c1605162.r62.cf0.rackcdn.com/iPhoneOS7.0.sdk.tbz2
5. SSH into your device. window users can install winscp and mac users I don't know so just search google
6. Go to /var/mobile/Documents/ and drag the file there(do not unzip it on PC)
7. Open ifile and go to /var/mobile/Documents/
8. Unzip the sdk file using ifile and wait for around 10 min to finish
9. make your file I will name mine file name.cpp located in /var/mobile/Documents/Downloads/
10. Open mobile terminal and giro that directory where your code is located with cd.....
11. The command: clang++ filename.cpp -isysroot /var/mobile/Documents/iPhoneOS7.0.sdk
12. a.out to run your program
Done
All credit for above is to CoolStar
Not jailbroken, don't want to jailbreak and not spend a penny?
We'll for this you will need access to the internet in order to compiler
Go to AppStore and install sourceLair