ı wanna write find function for my basic string class
but I could not do it look my code and give me idea how to create this function with loops and strcmp strcat etc.. ?
private: enum{SIZE=50}; char data[SIZE];
public:
MyPatient()
{
data[0] = '\0';
}
//1 arg structor
MyPatient( char const k[])
{
strcpy_s(data, k);
}
//destructor
~MyPatient() {};
int find( const MyPatient k) ???
{
return (strcmp(k.dizi, dizi));
}
explain by giving a code example
Aucun commentaire:
Enregistrer un commentaire