Quote:
Originally posted by eth0
Thanks for the tip with the vectors. I will research that method today. Probably be back with questions though :p
However, does the vector route not require that you keep a running total of how many elements are in the array?
jlou, I am already going down the route you suggested.
I am very determined to learn this lanuage, however it is very difficult to learn with books alone.
I am probably spending around 8 hours a day now trying to learn this. If I worked at a company with programmers, I know I could learn this in a quater of the time, as an experienced programmer to refer to when your stuck, can mean the difference between 10 minutes and 1 week. Even then at the end of the week your still uncertain yu tackled something in the best way.
I will deffinitely achieve this, i'm just trying to stress how difficult it is when you are on your own. People post code and solutions on here without explaining, which just goes totaly over your head. All part of the fun though :)
Vectors are a powerful array abstraction. Use the size() member function to return the number of values in the array at any time. The push_back(string) member function also dynamically appends a value to the end of your vector.