Good afternoon,
I'm currently working on an assignment with a custom programming environment using a sublanguage of c++ that lacks some of it's features.
I have written this code:
char comparameEsto(char voy, char vengo, pueblo sitios1, pueblo sitios2, pueblo sitios3,pueblo sitios4){
bool encontradoOrigen;
bool encontradoDestino;
char copia;
for(int i=0; i<13;i++){
strcpy(copia,sitios1[i]);
}
}
char comparameEsto(char voy, char vengo, pueblo sitios1, pueblo sitios2, pueblo sitios3,pueblo sitios4){
bool encontradoOrigen;
bool encontradoDestino;
char copia;
for(int i=0; i<13;i++){
strcmp(voy,sitios1[i]);
}
}
It's just an example of the functionality I'm looking for. The thing is, I want to copy the String inside sitios1 to copia, or compare them with voy and vengo, but it keeps telling me this:
invalid conversion from `char' to `char*'
I'm not very fluent in C++ (I'm more used to Java), and I'm having a really hard time understanding what should I do.
charis just a single character, not a string.pueblo?std::string?"pueblo"is a typedef I used to store different Strings,"typedef char pueblo[][30];"I use it to print the parallel value that's stored on an enum, since I can't print from the enum. And yes, I can usestring.hin this sublanguage.