the string variable named 'listt'(intentional double "t") does not appear to be declared despite it existing as a global variable.
i looked online for a solution, and all i could find were people telling me to make sure i wasn't 'using namespace std;'...which a wasn't anyway.
#include <iostream>
#include "sally.h"
#include <string>
#include <stdlib.h>
using namespace std;
//globals
/////////////r//c
//3 = what it is you're doing, the day its happening, the time its happening
string listt[7][3];
//functions
int main()
{
int option1;
while(option1 != -1){
sally obj;
option1 = obj.menuop();
obj.direct(option1, obj);
}
}
header file:
#ifndef SALLY_H
#define SALLY_H
class sally
{
public:
sally();
int menuop();
void direct(int a, sally obj);
void showlist();
void addlist();
void removelist();
virtual ~sally();
protected:
private:
int option1;
};
#endif // SALLY_H
body of the "addlist function"
void sally::addlist(){
system("cls");
string days[7] = {"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"};
for(int num = 0; num<7; num++){
listt[num][0] = days[num];
cout<<"On "<<days[num]<<" you will ";
cout<<...<<endl;
cin>>listt[num][1];
system("cls");
cout<<"On "<<days[num]<<" you will "<<listt[num][1]<<" at *insert 24 hour time here*";
cout<<"..."endl;
cin>>listt[num][2];
}
}