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:
If I then try to call that function with a const char*, it gives me a compile error that there is noCode:typedef char* cstring; void function (const cstring string) {}
But the candidate is:Code:void function (const char* string) // (With the const)
Can someone help me here? What's going on?Code:void function (char* string) // (Without the const)




Reply With Quote
