C and C++ compiler for iPhone and iPad
Use Kodo Editor to compile and run C or C++ exercises offline on iPhone and iPad. The app bundles Clang and runs the compiled WebAssembly inside the device. Your compiler output stays in the built-in terminal.
How to get started
- Create a local project and add
main.cppfor C++ ormain.cfor C. - Try the C++ example below. Compare its output with the expected result:
3. - Run the program from the editor and read the compiler diagnostics or program output in the terminal.
- Change one number or remove a bracket on purpose. Rebuild and compare the results.
- Before submitting coursework, run the same source against the instructor’s required toolchain and tests.
#include <iostream>
#include <vector>
int main() {
std::vector<int> scores{1, 2, 3};
std::cout << scores.size() << "\n";
}
Limits to know
The current toolchain targets C11 and C++17. Verify libraries and project layouts individually. Plan to use SSH for desktop-specific APIs, native binaries or build systems your course requires.
Frequently asked questions
Does it need internet to compile?
No. Kodo includes the compiler on the device. [source: App Store]
How does compilation work on iOS?
The bundled Clang toolchain compiles the source for WebAssembly, and an in-app runtime executes the output. [source: App Store]
Can I use the C++ standard library?
Start with standard headers such as iostream and vector. Test the exact headers and features your project requires.
What if I need the exact lab compiler?
SSH to the machine provided by your course if access is offered and run its compiler there.