Hello.
Here is a small piece of the program, which generally spoils the whole raspberry.
Option 1.
string MainStr; FILE *Storage; Storage=fopen("StorageF.txt", "wt"); std::cin>>MainStr; fprintf(Storage, "%s", MainStr); fclose(Storage); Storage=fopen("StorageF.txt", "rt"); fscanf(Storage, "%d", MainStr); std::cout<<MainStr<<"\n";
The program works, in the folder with it appears the file StroageF.txt which is filled, not with what I typed from the keyboard, but with some sort of meaningless combination of Russian letters.
Option 2.
string MainStr; FILE *Storage; Storage=fopen("StorageF.txt", "rt"); fscanf(Storage, "%d", MainStr); std::cout<<MainStr<<"\n";
StorageF.txt is already created and filled with numbers or Latin characters, but nothing is displayed in the console where cout is working — an empty string.
Essence: I do not want to enter the string with my hands, I want the string to be filled with data from a file, which I did not do right?