error: undefined reference

Not sure what I'm doing wrong. Here is the error message:
main.cpp:32: undefined reference to `FindPath::FindPath(Graph&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'

And here is my code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
int main(int argc, char** argv) {
    string userInput = "Tom Hanks";
    string temp = "huh?";
    stack<string> myStack;
    Graph myGraph(temp);
    
    //cin>>userInput;
    
    FindPath myPath(myGraph, userInput);
    myPath.pathTo(userInput, myStack);
    
    
    cout<<"Distance: "<<myPath.distanceTo(userInput)<<endl;

    return 0;


The error occurs at all three lines that call myPath.
Topic archived. No new replies allowed.