quote:Original post by DrPizza
Ooops, that was meant to reply to SabreMan''s post.
You mean to eliminate the copy call? Even better, if an initialising copy is appropriate to the problem, and it sounds like it is.
quote:Original post by DrPizza
Ooops, that was meant to reply to SabreMan''s post.
quote:Original post by liquidAir
I created an array of integers, say
int GoodIntegers[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
sizeof(GoodIntegers) gave 40!
which implies that sizeof(int) is 4!
quote:
So, logically (or shuldi say mathematically?) the number of elements in the array is
sizeof(GoodIntegers/4)
quote:
Well I used this method, but I had the feeling it was wrong!
quote:std::vector is probably closest to Java arrays ... except they are type-checked (e.g. std::vector).
quote:sabes, i wouldn''t call c style arrays idiotic. it''s just the best way kernigan and richie could think of doing them at the time.
quote:Original post by markuskidd
erm.. Java arrays *are* type-checked.