Reading in multiple files, displaying them (arrays and vectors) and me

1) I am having problems in figuring out exactly how to display the Sets from the separate files I have set up. I have 4 files : Set1A, Set1B, etc. I need to find out how to read in information from Multiple files correctly a desired horizontal fashion for the "cout' display. Same problem exists in reading in multiple files for vectors.

Code is below for reading in files (the arrays or vectors) and then merging them. I need to find out what I'm doing wrong. Thanks.

//Setting up the functions and arguments

//using namespace std;

//Number of integers in the arrays is 11, so set it;

const int ARRAYSET_SIZE=11;

//Function Prototypes declared - includes Vectors

void DisplayHeader(int);
void DisplayArray(int [], int);
//void Sort(int [], int);
void MergeArray(int [], int, int[], int);

//void ShowVectorHeader(int);
//void ShowVector(vector);
//void StartVectors (vector, vector);



void main(void)

//Read the Arrays from file:

ifstream infile;
int count;"C:\Documents and Settings\Steve\Desktop\Set1A.txt");"C:\Documents and Settings\Steve\Desktop\Set1B.txt");"C:\Documents and Settings\Steve\Desktop\Set2A.txt");"C:\Documents and Settings\Steve\Desktop\Set2B.txt");

int count= 0;


for (int count=0; count<=11; count++)


//Want to display the arrays separately here
//1A and 1B, then 2A and 2B the second time it is run.



//Merge Arrays together

void MergeArray (int xBeginArray[], int xBeginArrSize, int iEndArray[], int iEndArrSize)

for (int iCount=0; iCount<xBeginArrSize; iCount++)

iEndArray[iEndArrSize+iCount] = iEndArray[iCount];

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!