I want to set return a const char*
into char**
I want the compiler to validate there is no change on that char*
.
What the correct syntax should look like?
const char* str = "some str";
void test(char const **out_str) {
*out_str = str;
}
EDIT:
Maybe something like that?
char* const str = "some str";
void test(char** const out_str) {
*out_str = str;
}