Answer the question
In order to leave comments, you need to log in
How to display the numbers that are in the text in the file?
There are numbers in the text, they need to be displayed, how to do this?
ofstream file;
file.open("C:/Users/Desktop/text.txt");
ofstream file;file << "8ы м0л0дцы! ТекстТекстТекстТекст 01 01";
file.close();
char buff[80];
ifstream fin("C:/Users/Desktop/text.txt");
fin >> buff;
cout << buff << endl;
fin.getline(buff, 80);
fin.close();
cout << buff << endl;
Answer the question
In order to leave comments, you need to log in
Try checking each character with
if (typeid(std::int)==typeid(yourVariable)
{
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question