KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Say I have the following code: struct test* t1; t1 = get_t(1); ... where get_t is: struct test* get_t(int); How can I refactor the above code and put it in a function? Something like the following: void r1(?* t, ?* (fn*)(int)) { t = fn(1); } /* ... */ struct test* t1; r1(t1, &get_t);
Tags (comma-separated)
Save Edits
Cancel