Hello, guys would you mind teaching me how to run Stat Startfile via C++?

Hello, guys

Would you mind teaching me how to run Stat Startfile console command in C++? First, I have tried the Exec(). It does not work. And then I have tried the DirectStatsCommand(TEXT("stat startfile")); . It give me a critical error

[2018.09.17-17.09.10:306][788]LogCore: === Critical error: ===
Unhandled Exception: SIGSEGV: invalid attempt to read memory at address 0x0000000000000000
So, what should I do?
Thanks
Bests
YL