problem between XP and Ubuntu in code ...

Using CB,GCC,Win XP all are ok.
Using CB,GCC, Ubuntu i have the problem...

error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp, class _Alloc> class std::vector’|
error: expected a type, got ‘link’|
error: template argument 2 is invalid|
main.cpp|14|error: invalid type in declaration before ‘;’ token|
||=== Build finished: 4 errors, 0 warnings ===|





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

using namespace std;

struct link
{
  int tar;
  vector<int>cds;
};

vector<link> l11;

int main()
{
    cout << "Hello world!" << endl;
    return 0;
}




Last edited on
int link(const char *, const char *); defined in unistd.h (it is included trough the other headers)
Use a namespace
Topic archived. No new replies allowed.