Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main()
- {
- char word[50];
- fstream file;
- file.open("C://users//username//desktop//document.txt");
- if (!file.is_open())
- {
- return 0;
- }
- else
- {
- while (file.good())
- {
- file >> word;
- cout << word << " ";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement