/home/9/dunsonm/CSE_680/Homework_6 % g++ -o Vertices Vertices.cpp
Undefined first referenced
symbol in file
main /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4/crt1.o
ld: fatal: Symbol referencing errors. No output written to Vertices
collect2: ld returned 1 exit status
It's possible that you called some prototype somewhere that wasn't later defined. It seems like you erased parts of the error message, so I can't be certain.
You are declaring toVertices as a local variable on line 19. Once the constructor terminates (line 20) the variable is destroyed. (Even if it weren't, it would still not be accessible on line 34, since it is local to the constructor.)
Classes need definitions like the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// fooey.hpp
#include <vector>
class fooey
{
private:
int an_int;
std::vector <int> more_ints;
public:
fooey();
std::vector <int> get_ints() const;
};