Hey am trying to read contents of a text file into memory and will be read later by a different function.
This is how i am considering doing it
I was thinking of reading the whole file into an array but thought it might be too big seeing as file has alot of lines of text in it
Channel :: Channel(char* channelName, char* channelNumber, char* fileName)
{
this->channelName = channelName;
this->channelNumber = channelNumber;
this->fielName = fileName;
fstream* file = new fstream (FileName, fstream :: in);
char aSingleCharacter;
aSingleCharacter = (char) file->get();
while(aSingleCharacter != EOF)
{
aSingleCharacter = (char)file -> get();
}
}
any help be much appericated.