#include <iostream>
using std::cin; using std::cout; using std::endl; using std::cerr;
#include <fstream>
using std::ifstream;
#include <string>
using std::string;
#include <vector>
using std::vector;
#include <iterator>
using std::istream_iterator; using std::ostream_iterator;
using std::reverse_iterator;
int main() {
string input_path("/home/raymain/CLionProjects/CPPLv1/test.txt");
ifstream input(input_path);
if (input.is_open()){
istream_iterator<int> int_iter(input), eof;
ostream_iterator<int> out(cout, " ");
vector<int> vi(int_iter, eof);
for (auto r_iter = vi.crbegin(); r_iter != vi.crend(); ++r_iter){
out = *r_iter;
}
} else {
cerr << "Failed to open file" << endl;
return EXIT_FAILURE;
}
}