I declared a global function in a .cpp file void functionA(). I would like functionA() to be called exactly once before the start-up ( not inside main()). The thing I realize is if the function is int functionB(), I could call it using static int A = functionB(). But for return value of void, how could I do that?
Thanks
static int a = functionA(), 42;There are few places where comma expressions are useful, but this may be one of them.