I have read a lot about the subject and I am confused .
What used to work in a C
file ,not working on a cpp
file :
char *builtinFunctions[20];
Then I get error on the strcpy function here :
void Intepreter::setBuiltIns(char *builtins)
{
strcpy(builtinFunctions, builtins); // no matching function call to strcpy
}
I probably don't understand the basics here, but why in C++ this will not work ( do i need to use = instead ? )
strcpy(char *, const char*) = thats the structure
if I change the builtinFunctions
from being a pointer it works.
EDIT: The reason for being a const before this edit is that I read here : Why is conversion from string constant to 'char*' valid in C but invalid in C++
that char *builtinFunctions[20];
will produce warning when :
builtinFunctions[0]="me";
and it did. I could fix it by removing the const .