- 1
c style arrays taught in c++ course
Please replace these with std::vector or at least std::array, they're outdated.
21 Answers
+ 18
We can have a lesson on std::vector and std::array, but C-style arrays are no where near being outdated, less elegant, or less important. In terms of learning, you will want to start from the latter before you proceed to the former two.
+ 13
I do. it's 4:22am and I haven't slept. So yes. I do
+ 12
It is good to know both ways. What if one has to maintain legacy code one day?
+ 11
yes. also embedded systems may lack support for std::array
+ 11
Some may. I would agree that array and vector should be included along side c style arrays.
+ 10
more is always better :)
+ 6
Send Sololearn feedback 😃
+ 3
Arrays and subscripting is a language feature. std::array and std::vector are standard library features. Not all projects use standard library. So, imo learning the language features, especially the core ones, like arrays, is essential, and learning the standard library is really useful, but is kind of separate and nay even be optional. Learning std::arrays, std::vectors, and whatever else containers without getting a clue about the language provided arrays, is like learning about smart pointers without knowing what a regular pointer is.
+ 3
Using STL in some embedded projects may be problematic. Some STL functionality may be replaced with the framework's implementations, like in Qt (arguable topic). Different reasons, not very common.
+ 2
Perhaps the Sololearn developers can add new lessons C++03 and C++11 and give a brief explanation of STL Containers and other features in those, just like the lesson 'HTML5' in the HTML course.
+ 1
Ok, so we think different but we can all agree on teaching each of the three. That's fine.
+ 1
I don't quite agree on that. The most is the whole internet. And having read it is good, but probably you're lacking time. You know what I mean?
0
How?
0
Yes, but the older one is less important and the SL course is small anyways.
0
Ahhhh... It's about elegance, not about performance. And if it is not supported by some embedded systems, you can use c arrays again. How many SoloLearners which start learning c++ write embedded systems?
- 1
Ok.
- 1
@Hard I don't know exactly what you mean. But in the c course, low level arrays must be covered because a c coder has no other choice.
- 1
Yes, if they say you should try to avoid them, they can also introduce c style arrays.
- 1
That's interesting. Why do some people refuse to use stl for their projects?
- 1
Ok.