How to save data to text file using C++?

Hi
I have seen some hints on using the C++ codes for saving data from a game in a text file but they were not clear. Could someone give a step by step guide for this?
Thank youuuu

For config you can use this one

https://wiki.unrealengine.com/Config_Files,Read%26_Write_to_Config_Files

For save data, you can use this method from Rama

https://answers.unrealengine.com/questions/27254/writing-to-text-files.html

Or if you want to save to binary here

https://wiki.unrealengine.com/Save_System,Read%26_Write_Any_Data_to_Compressed_Binary_Files