Click to See Complete Forum and Search --> : why can't use vector<string> * func() as the member function?


codelulu
August 5th, 2004, 05:12 AM
class CFileInterface
{
public:
CFileInterface(void);
~CFileInterface(void);

* vector<string> * GetFileNames(void);
};

errors (all from line *):
d:\Computer Science\Visual Studio Projects\prehandling\FileInterface.h(10) : error C2143: syntax error : missing “;”(before “<”)

d:\Computer Science\Visual Studio Projects\prehandling\FileInterface.h(10) : error C2501: “CFileInterface::vector” : missing storage class or type specifier

d:\Computer Science\Visual Studio Projects\prehandling\FileInterface.h(10) : error C2238: unexpected token(s) preceding ';'

Where's the problem and how can i fix it?
THank u so much for your khelp

NoHero
August 5th, 2004, 05:29 AM
#include <string>
#include <vector>

using namespace std;

class CFileName
{
public:
vector<string>* GetFileNames();
};


this worked for me!