trouble with my code

i have been trying to code a two dimensional array so that it will read from a text file and display the data i am able to get it to read from the text file although it will not display the information. i was able to code it using a string but am having trouble with this two dimensional array.

#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
using std::ifstream;
using std::ofstream;
using std::endl;
using std::cout;

using namespace std;

class auditorium
{
private:
string seats;
public:
void readSeatsConfig();
void displaySeatsConfig(char[][30], int size );
void getSeatClass(char, char, char, char);
};

void auditorium::readSeatsConfig(){
ifstream infile;
ofstream outfile;

infile.open("seatsConfig.txt");

if (infile.fail())
{
cerr <<"file does not exist"<<endl;
}
else{
cerr<<"Reading text file"<<endl<<endl;
}


infile.close();
};


void auditorium::displaySeatsConfig(char s[][30], int size){

ifstream myfile ("seatsConfig.txt");
if (myfile.is_open())
{
while (! myfile.eof() )
{
for (int index1=0; index1<size; index1++){
for (int index2=0; index2<30; index2++)
{
myfile << s[index1][index2]<<endl;
}
}
}
myfile.close();
}

else cout << "Unable to open file";
};



if you could look at my code and give me feedback as to what is wrong i would really appreciate it thanks in advance
Please use [code][/code] tags when posting code

In readSeatsConfig you aren't reading data from the file.
in displaySeatsConfig you should use an ofstream for output
you don't have to post one topic twice.. you will get help for sure.
i was just posting a new solution i had came up with....
i replied to your previous post.. look at that.. :)
Topic archived. No new replies allowed.