Write the definition of the function insertBack() as a member function of the class AnyList as
follows: - Parameter: An int storing a value. - The function creates a new node that stores the
value passed by the parameter, and inserts the new node at the end of the list. Make sure you use
the initializer list constructor. This way, you will be using only one function, which is more
efficiend than using two (default constructor + setData). Functions.cpp Running Main.cpp

Write the definition of the function insertBack() as a member function.docx

  • 1.
    Write the definitionof the function insertBack() as a member function of the class AnyList as follows: - Parameter: An int storing a value. - The function creates a new node that stores the value passed by the parameter, and inserts the new node at the end of the list. Make sure you use the initializer list constructor. This way, you will be using only one function, which is more efficiend than using two (default constructor + setData). Functions.cpp Running Main.cpp