Skip to content

tpecholt/cppdraw

Repository files navigation

cppdraw

Introduction

CppDraw is an android app which I created to teach my students C++ in an interactive and playful way. While some of the students can't afford a laptop they usually posses android phones. This tool is like a mini IDE which allows to edit, compile and run C++ code. It comes with a small cppdraw library which allows to draw shapes, react on mouse events etc.

Additionally there is also a cppdraw-win project which implements cppdraw API on windows so students who own a laptop can fetch it and run the same code from Visual Studio.

Android Restrictions

The purpose of this app is to compile and run C++ code. Unfortunately android is not great for this scenario as the platform imposes many restrictions on its apps. It is still possible to deploy the app with a clang compiler and use it to compile user source code. But the result can't be linked into a shared object and loaded from the main app. Therefore this app compiles user code into an executable. The executable is run and communicates with the main app through IPC. As of August 2024 this still works on all phones which were available to me. But the app has to be built for an older targetSdk because running executables which were not part of the app package is forbidden in new version too. It is also not possible to distribute the app through the Play store but this is not an issue for my students.

Screenshots

Screenshot_20240830-045036 Screenshot_20240830-045228 Screenshot_20240830-045103

Credits

Designed and implemented by Tomas Pecholt.

This app was built using ImRAD. All UI and boilerplate code is generated by this tool which greatly simplified the whole process.

About

c++ learnig tool on android

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages