Hello, I need to do a simple coding for a school project but the teacher says nothing and I got nothing so I thought maybe you can help me guys. Heres the assignment: In a text file there are positive and negative number put them in array (1 job) then positive in other array and negative numbers in another array (2nd job) Then both of positive and negative numbers we put into txt files one's for negative second for positive (3rd job). So can some of you help a fellow beginner coder?
It's just the first step right now that im doing but not successfully trying to read the numbers out of a txt file
#include <iostream>
#include <ifstream>
#include <string>
using namespace std;
This is 1). It will read in numbers from the file and put them in the array and then display them. MAX_SIZE specifies the maximum number of numbers that can be read.
Doing 2) should now be fairly easy - just use 2 arrays and a test to see which one the numbers are put.