Hello so I finally was able to read intergers from a file and put them in an array.
Now I have to put those numbers in different arrays. If they are even they go to the even array if odd go to the odd array. Now I thought this was the way to do it but it aint When I cout to see it it gives me a place in memory. Heres my code thank you:
#include "StdAfx.h"
#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>
using namespace std;
int main ()
{
ifstream input;
int even [51];
int odd [51];
int a[50];
input.open("C:\\Users\\Desktop\\input.txt");
if(input.fail())
cout<<"FAIL"<<endl;
while(!input.eof())
{
for (int i=0; i<50; i++)
{input>>a[i]; //contains the intergers from the file
if (i%2==0)
even[1];
else
odd[i];
}
}
system ("pause");
return 0;
}