Hey everyone,
VC++ is givin me errors like
Code:
error C2146: syntax error : missing ';' before identifier '_fileStream1'
error C2501: 'ofstream' : missing storage-class or type specifiers
because of the line
Code:
ofstream _fileStream1;
which is in the private data section of my FileWriter class. I've attached the code below but i think i have included what i need to, is there somethin more about ofstreams that i need to know?
Code:
#include <stdio.h>
#include <fstream>
#include <string>
class FileWriter
{
public:
FileWriter(char* file_path /*name of file to be written*/);
void write(char* item_name, int item_number);
private:
ofstream _fileStream1;
};