In order to compile on the command line, one may have to specify the version of C++.
For example:
alim@Alims-MacBook:~/cs110c-classwork/group_project_2/LinearStructures_for_project_2$ g++ main.cpp -std=c++11