[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with standard template library
From: |
Carl Flarity |
Subject: |
Problem with standard template library |
Date: |
Wed, 29 Sep 2004 22:05:24 -0700 (PDT) |
I'm new at using gcc and new at using templates.
Please help me figure out what I'm doing wrong in the
following program. Is there something additional I
need to do to let the compiler know that vector is a
template?
Thanks,
Carl Flarity
//////////////////////////////////////////////////
#include <vector>
int main(void){
vector<int> v;
}
/*
Gives following output when I compile with gcc
version 3.3.3 (SuSE Linux) ...
gcc VectorTemplate.cpp -o VectorTemplate
VectorTemplate.cpp: In function `int main()':
VectorTemplate.cpp:5: error: `vector' undeclared
(first use this function)
VectorTemplate.cpp:5: error: (Each undeclared
identifier is reported only once
for each function it appears in.)
VectorTemplate.cpp:5: error: syntax error before `>'
token
make: *** [VectorTemplate] Error 1
*/
////////////////////////////////////////////////////
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
- Problem with standard template library,
Carl Flarity <=