この Notebook では,Cling - The Interactive C++ Interpreter 使用例を示しています。
Jupyter Notebook による Cling - The Interactive C++ Interpreter は Linux および macOS で利用可能です。
通常の c++ のソースでは,以下のように main()
でブログラム文を {}
で囲みますが...
#include <iostream>
using namespace std;
int main()
{
for(int i = 1; i <= 5; i++) {
cout << "こんにちは, C++ の世界! " << i << endl;
}
return 0;
}
#include <iostream>
using namespace std;
for(int i = 1; i <= 5; i++) {
cout << "こんにちは, C++ の世界! " << i << endl;
}