diff --git a/6-InRealEnvironment/2-FileStructure.ipynb b/6-InRealEnvironment/2-FileStructure.ipynb index 7cf9fe5f5be0d4f00ccd473c1adb0a7bed93a3c0..5d7a9eb13765e6d50ab2aa37f547cd489a3f3565 100644 --- a/6-InRealEnvironment/2-FileStructure.ipynb +++ b/6-InRealEnvironment/2-FileStructure.ipynb @@ -321,7 +321,33 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "works as expected and creates a valid `hello` executable (also note the header file is not required explicitly in this build command)" + "works as expected and creates a valid `hello` executable (also note the header file is not required explicitly in this build command). As in the previous case we can directly compile from heer using the ! symbol as follows:" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [], + "source": [ + "!g++ -std=c++17 2c-Demo/3-InTwoFilesWithHeader/hello.cpp 2c-Demo/3-InTwoFilesWithHeader/main.cpp -o hello" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hello world!\n" + ] + } + ], + "source": [ + "!./hello" ] }, {