Problem: assignment from 'char' to 'char *' lacks a cast---49
parse error at end of input---55
The Code:
Code:
#include <iostream.h>
#include <stdlib.h>
#include <fstream.h>
#define MAX 6
#define MAXLENGTH 8
#define MAXDAYS 7
#define DAYLENGTH 10
void arrange();
int main()
{
arrange();
system("PAUSE");
return 0;
}
void arrange(void)
{
int time=1;
int turn=1;
char seat[MAX][MAXLENGTH]={0};
char day[MAXDAYS][DAYLENGTH]={
"Monday" ,
"Tuesday" ,
"Wednesday" ,
"Thursday" ,
"Friday" ,
"Saturday" ,
"Sunday" ,
};
char storedays[MAX][MAXDAYS]={0};
ofstream a_file("C:/Windows/Desktop/Seating.wpd");
{
for(turn=1 ;turn <= MAX ;turn++)
{
cout << "Who is in seat "<< turn << " on Monday?"
<< endl;
cin >> seat[turn-1];
cout << "Seat " << turn << " on Monday" << ": "
<< seat[turn-1]
<< endl;
a_file << "Seat " << turn << ": " << seat[turn-1] << " on Monday" << endl;
}
turn=2;
upfor:
for(time=1 ;time <= MAXDAYS ;time++)
{
storedays[time-1][turn-1]=seat[turn-1];
a_file << "Seat " << turn << ": " << seat[turn-1] << " on " << time-1 << endl;
}
turn++;
goto upfor;
}