I can make a ofstream object to a textfile like this
ofstream obj("file.txt")
Then i can go ahead and send to it an int c=5
obj << c;
When i send c to the text file, What type of data does it get stored as?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Files are streams of bytes. There is no data typing in the file. When you read that information back from the file you’re responsible for knowing what data type to expect.