Community
Participate
Working Groups
In the following program... ========== typedef struct s { char *n; }; int main() { char* o; #define P ((struct s *) o) P->n = "Jack"; //extract return 0; } ========== ...if you select the statement on line 9 and invoke the Extract Function refactoring, CDT produces the following code: ========== typedef struct s { char *n; }; void extracted_function(char* o) { P->n = "Jack"; } int main() { char* o; #define P ((struct s *) o) extracted_function(o); return 0; } ========== Macro P is undefined in the extracted function.