if i will wrote
int x = init();
in the static space this function init() will call even before the winmian
I am writing c programs but compile it with c++ mode.. strange i never
used this kind of initialisers I was unaware of this.. (i think it may be handy though also maybe can bring some trouble, you must scan all the source to check what is called first etc)
1) I wonder is this a part of c standard as well or this is only c++ (and will not work in c)?
2) what with an order of calling this if i got more this than one (can i assume something on this order of calling or control order of it?)
3) is this generally encouraged way of writing in c (has it some downsides or pitfals?)
Edited by fir, 05 February 2014 - 05:55 AM.