1 KiB
1 KiB
Example markdown
Compare the processed version of this file with its unprocessed form.
The includes
The includes are important to tell the compiler what to expect later. In the example file, the includes are :
<include_snippet name="includes" file="example/src/example_code.cpp"/>
The factorial function
The factorial function is implemented recursively. It is defined in another file called factorial.cpp :
<include_snippet name="factorial_function" file="example/src/factorial.cpp"/>
The corresponding header file is :
<include_snippet name="header_factorial" file="example/include/factorial.h"/>
Some other function
Some other function is implemented in the example_code.cpp file.
While the snippet is defined in the C++ file, we can decide to not use it in the documentation.
Main function
In order to call all the functions defined above, the main function is implemented as such :
<include_snippet name="main_function" file="example/src/example_code.cpp"/>