When I use typedef to create a new type, the compiler gives me errors if I try to tag modifying keywords on. For example, if I do this:
Code:
typedef char*   cstring;
void function (const cstring string) {}
If I then try to call that function with a const char*, it gives me a compile error that there is no
Code:
void function (const char* string) // (With the const)
But the candidate is:
Code:
void function (char* string) // (Without the const)
Can someone help me here? What's going on?