- #include <iostream>
- using namespace std;
- #include "list.h"
- int main()
- {
- int m_value;
- // instantiate a List class (the constructor takes NO arguments)
- List list;
- // NOTE:
- // List list(); is incorrect, when there are no arguments don't use ()
- // insert numbers into the list
- while (cin>>m_value)
- {
- list.insert(m_value);
- }
- list.print();
- list.sum();
- return 0;
- }