Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#include <iostream>
#include <fstream>
#include <vector>
int main()
{
std::ifstream input("input.txt");
std::vector<std::string> strings;
std::string temp;
while (input >> temp)
{
strings.push_back(temp);
}
while (strings.size())
{
std:: cout << strings.back() << " ";
strings.pop_back();
}
std::cout << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.