I am after two things. I first want to typedef the vector
class to something a little more meaningful such as List
. I tried the following but it gave me a compile error:
template <typename T>
typedef vector<T> List<T>
Secondly I want to override the <<
operator of the vector
class, but I have no idea how I would go about it without creating a new class.
This may seem counter-productive but my end aim is to have something that non-programmers (or people that haven't done c++ before) can read that makes semantic sense.
If you do this, non-programmers still will be unable to read, let alone change, the code. However, C++ programmers will also have a lot of trouble reading the code.
If they cannot code, and need a C++ programmer to code it for them, then they will need a C++ programmer to understand, maintain, and extend the code which that first C++ programmer has written.
If, OTOH, they need to code in C++, then — surprise! — they will have to learn to write and read C++ code.
There really is nothing in between.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With