libscio/sciotest/main.cpp

31 lines
628 B
C++
Raw Normal View History

2020-02-14 18:17:17 +01:00
//
// main.cpp
// sciotest
//
// Created by Bob Polis at 2020-02-14
// Copyright (c) 2020 SwiftCoder. All rights reserved.
//
#include <iostream>
#include <cstdlib>
#include <libcommon.hpp>
#include <libscio.hpp>
using namespace std;
int main(int /*argc*/, const char * argv[]) {
try {
2020-02-22 21:19:15 +01:00
sc::io::fdostream chan {1};
chan << "Please enter a line of text:\n";
string line;
sc::io::fdistream is {0};
getline(is, line);
cout << line << '\n';
2020-02-14 18:17:17 +01:00
} catch (const exception& ex) {
cerr << su::basename(argv[0]) << ": " << ex.what() << '\n';
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}