I'm getting an error msg
DataReader.h:13: error: 'String' was not declared in this scope
DataReader.cpp:5: error: redefinition of 'std::vector<Data*, std::allocator<Data*> > DataReader'
DataReader.h:13: error: 'std::vector<Data*, std::allocator<Data*> > DataReader' previously declared here
DataReader.cpp:5: error: 'String' was not declared in this scope
this is my cpp file
#include "DataReader.h"
using namespace std;
vector<Data*> DataReader(String textFile) //line 5 that's giving error
{........}
and this my header file
#include <fstream>
#include <iostream>
#include <vector>
#include <string>
#ifndef DATA_H
#define DATA_H
#include "Data.h"
#endif
std::vector<Data*> DataReader(String something);
they work fine when i take out the string parameter and hard code the name of the string. but i need to use this function several times and would like to be able to pass in a string as a parameter. the string that i'm passing is name of a text file. am i mistaken somewhere? i can't seem to figure it out.. i mean what does it mean 'String' was not declared in this scope?? I am passing it and I included . something wrong with my parameter?? if you can shed some light to this matter, it would be greatly appreciated..
Dean