Skip to content

Instantly share code, notes, and snippets.

@Appendme
Created October 25, 2018 17:54
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