Ask your own question, for FREE!
Computer Science
sleepyjess:

@ultrilliam

5 months ago
Ultrilliam:

Ya this is probably much more ideal, lol

5 months ago
Ultrilliam:

So where did I lose you in DM's?

5 months ago
sleepyjess:

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

5 months ago
sleepyjess:

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

5 months ago
Ultrilliam:

What's the error?

5 months ago
sleepyjess:

1 attachment
5 months ago
Ultrilliam:

And changing that to DoctorList.h?

5 months ago
sleepyjess:

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

5 months ago
sleepyjess:

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

5 months ago
Ultrilliam:

Had a feeling we would hit a brick wall there lol

5 months ago
Ultrilliam:

Hm

5 months ago
sleepyjess:

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

5 months 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); ```

5 months ago
sleepyjess:

make all of that Doctor.h

5 months ago
sleepyjess:

?

5 months ago
Ultrilliam:

Wait back that up

5 months ago
Ultrilliam:

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

1 attachment
5 months ago
sleepyjess:

DoctorList.cpp

5 months ago
sleepyjess:

no, PatientList.cpp

5 months ago
sleepyjess:

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

5 months ago
sleepyjess:

OOOOHHHHH, that's from DoctorList.h

5 months ago
sleepyjess:

giving the same exact error for all 4 files

5 months ago
sleepyjess:

all saying there's no Doctor.h

5 months ago
Ultrilliam:

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

5 months ago
sleepyjess:

new errors!

5 months ago
Ultrilliam:

yay

5 months ago
Ultrilliam:

LOL

5 months ago
Ultrilliam:

Now let's create patient.h

5 months ago
sleepyjess:

did that

5 months ago
sleepyjess:

1 attachment
5 months ago
sleepyjess:

5 months ago
Ultrilliam:

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

5 months ago
sleepyjess:

where do I put those?

5 months ago
Ultrilliam:

At the top of the Doctor/Patient files

5 months ago
Ultrilliam:

(lists)

5 months ago
sleepyjess:

in the cpp or h files? or both?

5 months ago
Ultrilliam:

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

5 months ago
Ultrilliam:

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

5 months ago
sleepyjess:

5 months ago
sleepyjess:

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

5 months ago
sleepyjess:

I is back

5 months ago
Ultrilliam:

Whew, that's earlier then expected lol

5 months ago
sleepyjess:

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

5 months ago
Ultrilliam:

Oh, I read 5 hours

5 months ago
sleepyjess:

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

5 months ago
Ultrilliam:

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

5 months ago
sleepyjess:

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

5 months 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); ^~~~~~~~

5 months ago
sleepyjess:

this is very frustrating...

5 months ago
Ultrilliam:

Hm

5 months ago
Can't find your answer? Make a FREE account and ask your own question, OR you can help others and earn volunteer hours!
Latest Questions
iamjustmea: "My love is like a red, red rose" is a simile.
1 hour ago 13 Replies 2 Medals
iamjustmea: The most common foot in English poetry is the _
2 hours ago 0 Replies 0 Medals
lindey: Given the system mc022-1.jpg, which is true?
27 minutes ago 2 Replies 0 Medals