I\'m learning File Handling in C++, but there is a problem here. I am trying to read a file. This code is meant to output Hello World. but it outputs 0x22fed8.
EDIT: With mrree's suggestions.
ifstream fin("file.txt"); if (fin.is_open() == false) { // error } string line; while( getline(fin, line) ) { cout << line; }