Ok, so I am trying to fix my C++ assignment, but when I use strcpy_s it only works for my array and not my *pointer.. here is what I am working with:
HotelRoom::HotelRoom(char Num[], int cap, double daily, char* name, int Stat)
{
strcpy_s(room_Num, Num); //copy first argument into room_Num[]
guest = new char[strlen(name) +1]; //create space for the name
strcpy_s(guest, name); //copy second argument into new space
capacity = cap;
dailyRate = daily;
occupancyStat = Stat;
}
This is the error I get when using it in this manner strcpy_s(guest, name); :
"no instance of overloaded function "strcpy_s" matches the argument list argument types are: (char*, char*)".