#include <iostream> #include <vector> #include <fstream> int main( void ) { std::string word; std::vector<std::string> file; std::ifstream in( "Files.txt" ); while ( in >> word ) file.push_back( word ); for ( size_t i=0; i<file.size(); i++ ) std::cout<< file.at(1) << '\n'; in.close(); return 0; }
int main( void ) { std::string text; std::string word; std::vector<std::string> file; std::ifstream in( "Files.txt" ); while ( in >> word ) { //file.push_back( word ); text += word; } // easy print out of the full text cout << text << endl;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)