How to initialize C++ project using conan 2.x

The simplest way of starting is by running the following command in your project directory:

conan new basic

This will create conanfile.py from the basic template.

Alternatively, you can initialize it from a predefined template such as cmake_exe:

conan new cmake_exe -d name=myproject -d version=1.0.0