From 424418e850ac9ad9acbc160c4355a4656f987dce Mon Sep 17 00:00:00 2001 From: HanEmile Date: Tue, 14 Feb 2017 19:26:08 +0100 Subject: able to read data from file --- main.cpp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index d3b6ea6..b895b20 100644 --- a/main.cpp +++ b/main.cpp @@ -1,9 +1,25 @@ #include #include +#include +#include int main(){ - std::cout << "Download Data" << std::endl; - command - system("ls -l"); + // system("ls -l"); + // system("python3 download_data.py"); + + std::string line; + std::ifstream file ("TLE/argos.txt"); + + if(file.is_open()){ + while(getline(file, line)){ + std::cout << line << '\n'; + } + file.close(); + } + + else{ + std::cout << "Unable to open file"; + } + return 0; } -- cgit 1.4.1