I am currently following Stroustrup's A Tour of C++ and experimenting with CLion.
I typically create a main function, required additional functions and call them from the main function. This setup is for each feature of the C++ that I am studying, like, for example reference variables. I get an instant gratification in that I run the program and analyze the output.
However, CLion project structure (with builtin CMake) makes it harder. I can't have one project with multiple main functions (each in its own file) in a project. Creating a separate C++ project for each feature is too onerous. Note that Ij allows creation of multiple Java classes with the main method.
How do people do it, and is there a CLion way of learning C++ piecemeal like this?