C++

Create basic C++ Assignment

create course

Create an assignment

  • Click on connect on the course.

  • Click on formgrader tab on menubar. It will open a new page on new tab.

  • Create one assignment and click on the link mentioned in the Name (first column).

Tip

You can download basic C++ assignment file with following link.
Download cpluscplus.ipynb file

  • You can upload it by clicking on upload button right side of the jupyter notebook, select the file already downloaded and click on upload button.
  • Uploaded file is a assignments. you'll see assn-cplusplus in file section. You can open it by clicking on it.
  • To verify this assignment is working correctly, You can click on validate button that you can find in the tool bar.
  • Congratulations! ✨ 🔥 👏

How to install and use c++ library?

  • Open terminal.

Open terminal

  • We provide a package for the conda package manager.

  • Installing xwidgets and the C++ kernel

conda install xeus-cling xwidgets -c conda-forge
  • Then, the front-end extension must be installed for either the classic notebook or JupyterLab.

  • Installing the extension for the classic notebook

conda install widgetsnbextension -c conda-forge
- Installing the JupyterLab extension

jupyter labextension install @jupyter-widgets/jupyterlab-manager

Note

This command defaults to installing the latest version of the JupyterLab extension. Depending on the version of xwidgets and jupyterlab you have installed you may need an older version

  • To test the installation of c++ library with conda.
#include "xwidgets/xslider.hpp"

Install Boost library

  • Open terminal.

Open terminal

  • We provide a package for the conda package manager.
conda install -c conda-forge boost
  • To test the installation of boost library with conda.
#include <iostream>
#include <boost/locale.hpp>
#include <boost/algorithm/string/case_conv.hpp>

Danger

  • You can not run a main method as xeus-cling is a Jupyter kernel for C++ based on the C++ interpreter cling and the native implementation of the Jupyter protocol xeus. more about xeus-kernel