simple example

Source code
main.cpp
          
#include "aux.h"
#include <iostream>

int main()
{       
    int control_flag=0;
    //$ ask user whether to proceed
    std::cin >> control_flag;
    
    if (control_flag==1){
        //$ call shower
        //pointer to the object VINCIA
        VINCIA* vinciaOBJ = new VINCIA();
        vinciaOBJ->shower();  //$
        delete vinciaOBJ;  
    }
    return 0;
}
          
aux.h
class VINCIA {
public:
    void shower();
};
          
aux.cpp
#include "aux.h"
#include <iostream>

void VINCIA::shower(){
//$ do VINCIA parton shower
std::cout << "the parton shower code would go here";

int numberofevents=10000;
for (int i = 1; i < numberofevents; ++i) {    

  //$1 1) prepare system of partons

  //$1 2) do phase 1 of shower

  //$1 3)...

}

return;
};
          
Flowcharts (activity diagrams)
main.cpp -- INT main()

image

aux.cpp -- VOID VINCIA::shower()

zoom level 0
image

zoom level 1
image