sleepyjess:

@ultrilliam

3 weeks ago
Ultrilliam:

Ya this is probably much more ideal, lol

3 weeks ago
Ultrilliam:

So where did I lose you in DM's?

3 weeks ago
sleepyjess:

hold on... let me see if I'm as lost as I think I am...

3 weeks ago
sleepyjess:

sooooo.... I'm getting an error in the files that were given to us...

3 weeks ago
Ultrilliam:

What's the error?

3 weeks ago
sleepyjess:

1 attachment
3 weeks ago
Ultrilliam:

And changing that to DoctorList.h?

3 weeks ago
sleepyjess:

DoctorList.h:19:12: error: 'Doctor' does not name a type static Doctor doctors[]; ^~~~~~

3 weeks ago
sleepyjess:

it seems like all of the files have the #include "Doctor.h" though

3 weeks ago
Ultrilliam:

Had a feeling we would hit a brick wall there lol

3 weeks ago
Ultrilliam:

Hm

3 weeks ago
sleepyjess:

so am I supposed to create another file named Doctor.h?

3 weeks ago
Ultrilliam:

Hm, yea, throw this in Doctor.h ```cpp /* * File : DoctorList.h * Author: Ricky Landry (rlandry) * Course: COP3014 * Proj : Project 02 * Descr : The declaration of the class that contains the initialized list * of doctors available to be scheduled for the day. * */ #ifndef DOCTORLIST_H_ #define DOCTORLIST_H_ #include "Doctor.h" class DoctorList { public: static Doctor doctors[]; static const int size; }; #endif /* DOCTORLIST_H_ */ /* * File : DoctorList.cpp * Author: Ricky Landry (rlandry) * Course: COP3014 * Proj : Project 02 * Descr : The definition of the class that contains the initialized list * of doctors available to be scheduled for the day. */ #include "DoctorList.h" Doctor DoctorList::doctors[] = { {"Gerardo Socia", 45, "Ophthalmology"}, {"Jeremy Porche", 31, "Neurology"}, {"Tamiko Poat", 57, "Pediatrics"}, {"Marjorie Weatherman", 27, "Rheumatology"}, {"Cheyenne Stevenson", 35, "Cardiology"} }; const int DoctorList::size = sizeof(doctors)/sizeof(Doctor); ```

3 weeks ago
sleepyjess:

make all of that Doctor.h

3 weeks ago
sleepyjess:

?

3 weeks ago
Ultrilliam:

Wait back that up

3 weeks ago
Ultrilliam:

Let's go back a bit to this, what file does this come from (the error)

1 attachment
3 weeks ago
sleepyjess:

DoctorList.cpp

3 weeks ago
sleepyjess:

no, PatientList.cpp

3 weeks ago
sleepyjess:

it says DoctorList.cpp on the pic, but now that file is giving different errors...

3 weeks ago
sleepyjess:

OOOOHHHHH, that's from DoctorList.h

3 weeks ago
sleepyjess:

giving the same exact error for all 4 files

3 weeks ago
sleepyjess:

all saying there's no Doctor.h

3 weeks ago
Ultrilliam:

Okay, Let's just create a blank Doctor.h then and see what happens

3 weeks ago
sleepyjess:

new errors!

3 weeks ago
Ultrilliam:

yay

3 weeks ago
Ultrilliam:

LOL

3 weeks ago
Ultrilliam:

Now let's create patient.h

3 weeks ago
sleepyjess:

did that

3 weeks ago
sleepyjess:

1 attachment
3 weeks ago
Ultrilliam:

```cpp typedef string Doctor; typedef string Patient; ```

3 weeks ago
sleepyjess:

where do I put those?

3 weeks ago
Ultrilliam:

At the top of the Doctor/Patient files

3 weeks ago
Ultrilliam:

(lists)

3 weeks ago
sleepyjess:

in the cpp or h files? or both?

3 weeks ago
Ultrilliam:

`typedef string Patient;` in the patient files `typedef string Doctor;` in the doctor files

3 weeks ago
Ultrilliam:

Probably only the CPP is needed, since it would already be there once the .h files are included

3 weeks ago
sleepyjess:

3 weeks ago
sleepyjess:

The first error in both cpp files is coming from the .h files

3 weeks ago
sleepyjess:

I is back

3 weeks ago
Ultrilliam:

Whew, that's earlier then expected lol

3 weeks ago
sleepyjess:

I said 2 hours... it's been just over 2 hours lol

3 weeks ago
Ultrilliam:

Oh, I read 5 hours

3 weeks ago
sleepyjess:

still getting this: ``` DoctorList.cpp:9:9: error: 'string' does not name a type typedef string Doctor; ^~~~~~

3 weeks ago
Ultrilliam:

```cpp typedef char Doctor; typedef char Patient; ``` v2?

3 weeks ago
sleepyjess:

okay, now only this: ``` DoctorList.cpp:17:77: error: braces around scalar initializer for type 'Doctor {aka char}' {"Cheyenne Stevenson", 35, "Cardiology"} }; ^

3 weeks ago
sleepyjess:

and for PatientList.cpp: ``` In file included from PatientList.cpp:10:0: PatientList.h:19:12: error: 'Patient' does not name a type static Patient patients[]; ^~~~~~~ PatientList.cpp:13:31: error: 'Patient PatientList::patients []' is not a static data member of 'class PatientList' Patient PatientList::patients[] = { {"Alan Harry", 24, "Male"}, ^ PatientList.cpp:60:76: error: braces around scalar initializer for type 'Patient {aka char}' {"Mazie Harry", 70, "Other"} }; ^ PatientList.cpp:62:38: error: 'patients' was not declared in this scope const int PatientList::size = sizeof(patients)/sizeof(Patient); ^~~~~~~~

3 weeks ago
sleepyjess:

this is very frustrating...

3 weeks ago
Ultrilliam:

Hm

3 weeks ago
Similar Questions: