31 lines
628 B
C++
31 lines
628 B
C++
//
|
|
// 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 {
|
|
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';
|
|
} catch (const exception& ex) {
|
|
cerr << su::basename(argv[0]) << ": " << ex.what() << '\n';
|
|
return EXIT_FAILURE;
|
|
}
|
|
return EXIT_SUCCESS;
|
|
}
|