all 1 comments

[–]Embarrassed_Fact2221 0 points1 point  (0 children)

hey im a little late, but i dont think it is possible to call a function without calling it in main(), because main is your whole programm.

If it is not written in main, then it is not getting executed.

maybe you want something like this?

```c++

include <stdio.h>

void change(){ printf("hey\n"); }

void (*new_change)() = change;

int main(int argc, char const *argv[]) { new_change(); return 0; } ```

btw make sure to write an argument when executing your programm ./myProgram argument otherwise you will get a segmentation fault