Undefined reference to vector structure from function call std:: vector twoNumbers, std::allocator<twoNumbers>, const&.

Why do I keep getting this error at line 18?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <iostream>
#include <vector>

using namespace std;

struct twoNumbers
{
    int x;
    int y;
};

void multiplyNumbers(const vector<twoNumbers>&);

int main()
{
    vector<twoNumbers>returnResult;

    multiplyNumbers(returnResult);

    return 0;
}
Last edited on
deathslice wrote:
Why do I keep getting this error at line 18?
Which error? What is the body of multimplyNumbers?
the error was an undefined reference on line 18 but I guess I fixed it for now. I tell you if I get this error again. Also, I didn't include the body because I usually test each line of code to make sure they're working properly. I guess adding the body of the function resolved this problem. I guess it's just one of those dumb moments
Last edited on
Topic archived. No new replies allowed.