CodeTheRobot

C++ Beginner · exercise 04

Vectors & strings

Store joint names in a std::vector and print them with a one-based index.

C++ Beginner lesson 04

Guided steps

  1. 1.Create a std::vector<std::string> with shoulder, elbow and wrist.
  2. 2.Print each entry as index and name, counting from 1.
  3. 3.Print the number of entries using .size().

Your code

Your code is saved in this browser after every run and restored next time.