question about File handling
Please somebody tell me about the code of reading numbers from files, such as when i input to read email adress, it just read email adresses from a file
Here are the steps:
Declare a std::ifstream object
use that object to open a file
check if the file has been opened
extract data from the file
close the file
//note that the std::ifstream destructor closes the file when the object is being destroyed, so the line infile.close() is somewhat redundant.
Thankyou very much. i willtry it
Topic archived. No new replies allowed.