How to run C++ code in Google Colab painlessly

Аватар автора
Молодежный Python-университет
see also: how to include header and source files Create a notebook on Google Colab, and the create the necessary header source and main files. It is possible to execute C++ code right inside Google Colab. You can then expand Colab beyond just running Python scripts. (C++ header file) %%writefile test.h (C++ source code): %%writefile test.cpp (C++ main) %%writefile main.cpp //Main function int main(int Argc,char* Args[]){ return 0; } (Compile and run): %%script bash %%script bash g++ main.cpp -std=c++11 ./a.out

0/0


0/0

0/0

0/0