error: conversion from 'std::vector<walls, std::allocator<walls> >' to non-scalar type 'walls' requested
I essentially have a vector (filled with an object called walls) in a class and i wanted a function that could return one of these objects but i get this error.
ok thanks for the reply. That makes sense and i should have realised that was what it was conveying, but i didnt think i was passing a vector. Anyway here's the code:
1 2 3 4 5 6 7 8 9
class weapons{
private:
std::vector<walls> projectiles[0];
public:
walls getwall(int i);
};