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:

No instructor I know teaches vectors first.

Stroustrup for one does.

commented: epic pwnage! +1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.