Queue of objects does not compile

Hi, I feel really stupid about this one... I can't figure out why every STL container I try works with regular types (int etc.) but not with class objects. What I want is a queue, but since I've never used them I tried deque and vectors to make sure, I always get the same result:
1
2
3
4
5
crawler.h:39:16: error: type/value mismatch at argument 1 in template parameter list fortemplate<class _Tp, class _Alloc> class std::vector’
     vector<link> links;
                ^
crawler.h:39:16: error:   expected a type, got ‘link’
crawler.h:39:16: error: template argument 2 is invalid


Here is the code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef CRAWLER_H
#define CRAWLER_H
#include <queue>
#include <list>
#include <deque>
#include <vector>
#include "options.h"
class link
{
public:
    link(string url);
    string getraw();
    void seturl(string);
    string getserver();
    string getlocation();
    ~link();
private:
    string server;
    string location;
};
class crawler {
public:
    crawler(config);
    crawler(string,int,int);
    virtual ~crawler();
    void run();
private:
    config conf;
    queue<link> links;
};

#endif /* CRAWLER_H */

I'm using g++ with -std=C++11
Where is line 39?

You should also be properly scoping your std:: namespace items.
Yeah, the error message is from different code, try and match/post the proper pair.

Error: vector<link> links;
Code: queue<link> links;

Also include <string>
Also scope - as per @jlb

What's the definition of type "config"?
Yeah, I copied the error from when I tried with a vector, and the code from when I tried with a queue, it's the only change I made. Line 39 is line 29 in my post (removed bunch of unrelated comments on top). I'm using namespace std, I guess I added that while writing my post to make sure.

I was so tired yesterday I didn't try
link links;
(Doesn't work in the header, works in other files)

So I moved link inside crawler, problem solved.
Topic archived. No new replies allowed.