-
September 12th, 2009, 01:50 AM
#1
setting up a simple template...
I am stumped on a simple template problem
I copied this code from a book word for word and the code doesn't work. I wonder if there is a typo in the book or maybe I am stupid and missed something but heres the code:
----------------------------------------------------------------------------
#include <set>
#include <iostream>
using namespace std;
template <typename Container>
void displaySet(const Container & input);
int main (int argc, char * const argv[])
{
return 0;
}
template <typename Container>
void displaySet(const Container & input)
{
Container::const_iterator iElement;
//RIGHT HERE I GET (error: expected ";" before 'iElement')
}
------------------------------------------------------------------------------
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|