Confused by my error with std::vector

Question:
I am working a a project, and I use a function with parameter std::vector<Class*> name. When I compile, I get an obnoxiously long and difficult to read error, which I am not understanding fully. I think it is telling me it should be std::vector<Class*, std::allocator<Class*>> name, but upon changing it, I still received the exact same error.
The error is described succinctly as linker command failed with exit code 1.
Repl link:
https://replit.com/@ThomasWarenski/M05-Programming-Assignment
If you cannot access the link, I don’t know why. I haven’t made the repl private or anything, so it should work, but I’ve been having trouble with that lately.

In main.cpp

#include "Menu.h" // All classes included in Menu.h

int main() {
    std::vector<Beverage*> drinks;

    menu(std::cout, std::cin, drinks);
}

In Menu.h

#include <iostream>
#include <vector>
#include "Coffee.h" // These are all subclasses of Beverage
#include "EnergyDrink.h"
#include "Soda.h"
#include "Tea.h"

void menu(std::ostream &out, std::istream &in, std::vector<Beverage*> drinks);

Thank you anyone and everyone.

Solved the issue on my own.

1 Like

Hey @ThomasWarenski. It’s great to hear that you’ve fixed your problem, but please provide an explanation to how you did, so that other people who have the same problem know the solution.

1 Like

I’m afraid I don’t remember. It was a while ago, but I wanted this topic to eventually close.
I think it resolved on it’s own.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.