whats the difference between int i=5 and int i(5)
Mar 16, 2010 at 5:41am UTC
Is there any performance difference between above statement.
Does above code contain any kind of difference ?
Please suggest.
Last edited on Mar 16, 2010 at 5:44am UTC
Mar 16, 2010 at 7:31am UTC
Int i = 5 ; here your declaring a variable of type integer and assigning it to 5 , int(5); your declaring a 1 d array of type integer with 6 elements or 6 storage spaces
Mar 16, 2010 at 10:42am UTC
No. They are both the same.
1 2
int i = 5; // implicit constructor notation
int i(5); // explicit constructor notation
BTW this is "articles " section ( the topic was moved )
Last edited on Mar 16, 2010 at 4:16pm UTC
Topic archived. No new replies allowed.