Community
Participate
Working Groups
In the following program... ========== int main() { static char msg[] = "Error"; // select "Error" return 0; } ========== If you select "Error" (on line 3), and invoke the Extract Constant refactoring, CDT produces the following incorrect code: ========== int main() { const char* extracted_constant = "Error"; static char msg[] = extracted_constant; // select "Error" return 0; } ========== The extracted variable is of type const char*. So, it cannot be an initializer for static char msg[].