Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @include iostream
- @include fstream
- @include string
- using NameSpace std
- int main{
- string line;
- ifstream myfile(example.txt);
- if(myfile.is_open()) {
- while ( getline (myfile,line) )
- {
- cout<line<'\n';
- }
- myfile.close[];
- }
- else cout<"Unable to open file";
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement