reading a txt file into an array

I am having trouble reading a txt file into an array. The text file will 10 objects wiht 3 parts each an id, sold , and remaining. I have to make all of those parts using only one array and im not sure how i would do that
im not sure if i include the array in the class or what to do any advise is apreciated


This is the code (i have have no idea what to do next)
(header)
#include <iostream>
#include <string>
using namespace std;

class item
{
public:
item ();
string id;
int sold;
int remaing;
char array [100] [3];

}

Last edited on
Topic archived. No new replies allowed.