Ov course you don't, but many people here feel that vectors are the only solution to using arrays. They love suggesting things obviously beyond your level.

This is not beyond his level. There is no reason to learn arrays before vectors. Novices should learn vectors because they convey the same concept but are "easier" and THEN be told that if they want to get rid of the overhead they can access the memory directly using arrays.

This is not beyond his level. There is no reason to learn arrays before vectors. Novices should learn vectors because they convey the same concept but are "easier"

Agreed, vectors are far easier to learn, with fewer chances to make errors.

This is not beyond his level. There is no reason to learn arrays before vectors. Novices should learn vectors because they convey the same concept but are "easier" and THEN be told that if they want to get rid of the overhead they can access the memory directly using arrays.

Of course there is a reason to learn arrays before vectors. It's what the instructor teaches. Plus, they allow concepts to be taught that vectors cannot teach.

No instructor I know teaches vectors first. If you feel they are wrong, discuss it with the instructor. But if they haven't taught vectors, the students can't use them. And how does using std::sort() teach the intricacies of sorting? Do you really believe the task to just sort, and not to learn anything about sorting?

:icon_rolleyes:

This article has been dead for over six months. Start a new discussion instead.