Is there a difference between those?

 

Does it matter if I declare like this:

int var;

var++;  

//Will it work,or do I need to assign zero to the var first like that?

int var=0;

var++;

//Or it does not matter?

Thank you.
 
t0mbfunk:

Does it matter if I declare like this:


No difference for MQL4, but it's not true for all language.
 

See Initialization of variables in Documentation: "Any variable can be initialized at its defining. Any variable is initialized with zero (0) if no other initial value is explicitly defined."

 
t0mbfunk:

Does it matter if I declare like this:


If you use the 2nd option you don't need to guess or hope . . .
Reason: