Error Strcpy Was Not Declared In This Scope, Error: Strcpy Was Not Declared In This Scope

I get this problem in a c++ problem compiling in Ubuntu g++ version 4.4.3.I dont know the headers to include to solve this problem.. Thanks

centro_medico.cpp: In constructor ‘Centro_medico::Centro_medico(char*, char*, int, int, float)’:centro_medico.cpp:5: error: ‘strcpy’ was not declared in this scopecentro_medico.cpp:13: warning: deprecated conversion from string constant to ‘char*’centro_medico.cpp:13: warning: deprecated conversion from string constant to ‘char*’centro_medico.cpp: In member function ‘Centro_medico& Centro_medico::operator=(const Centro_medico&)’:centro_medico.cpp:26: error: ‘strcpy’ was not declared in this scopecentro_medico.cpp:39: warning: deprecated conversion from string constant to ‘char*’centro_medico.cpp:39: warning: deprecated conversion from string constant to ‘char*’centro_medico.cpp: In member function ‘bool Centro_medico::quitar_medico(int)’:centro_medico.cpp:92: warning: deprecated conversion from string constant to ‘char*’centro_medico.cpp:92: warning: deprecated conversion from string constant to ‘char*’centro_medico.cpp: In member function ‘void Centro_medico::mostrar_especialidades(std::ostream&) const’:centro_medico.cpp:123: error: ‘strcmpi’ was not declared in this scopecentro_medico.cpp: In member function ‘void Centro_medico::mostrar_horarios_consulta(char*) const’:centro_medico.cpp:162: error: ‘strcmpi’ was not declared in this scopecentro_medico.cpp: In member function ‘void Centro_medico::crea_medicos()’:centro_medico.cpp:321: warning: deprecated conversion from string constant to ‘char*’centro_medico.cpp:321: warning: deprecated conversion from string constant to ‘char*’medico.cpp

#include “medico.h”#include #include #include #include#includelong Medico::total_consultas=0; Medico::Medico(char *nom,char * espe,int colegiado,int trabajo){int i;strcpy(nombre,nom);strcpy(especialidad,espe);num_colegiado=colegiado;num_horas_diarias=trabajo;citas_medico= new Cita*<5>; // 5 Días de las semana, de Lunes a Viernes.for (i=0;imedico.h

#pragma once#include #include using namespace std;#include “cita.h”class Medico{ private: char nombre<50>; char especialidad<50>; int num_colegiado; int num_horas_diarias; Cita **citas_medico; static long total_consultas; public: void mostrar_calendario_citas(ostream &o=cout) const; bool asignar_cita(int d, int hor,Paciente *p=NULL); void anular_cita(int d, int hor); bool consultar_cita(char dni<10>, int modificar=0); void modificar_cita(int d, int hor); void vaciar_calendario_citas(); void borrar_calendario_citas(); char* get_especialidad(char espec<50>) const; char* get_nombre(char n<50>) const; int get_num_colegiado() const; int get_num_horas() const; void set_num_horas(int horas); void mostrar_info(ostream &o=cout) const; static long get_total_consultas(); Cita* operator<>(int dia); void eliminar_calendario_citas(); void crear_calendario_citas(); Medico(char *nom,char * espe,int colegiado,int trabajo); Medico(const Medico &m); Medico &operator=(const Medico &c); void operator delete(void*); ~Medico(); }; ostream& operator>(ifstream &fichero, Medico &m);

Leave a Comment