Read data from text file and put it into Queue

Hi..
I suppose to have a programe to read a data from a file and enqueu it to the Queue.
The programme works like a Priority queue whether the ladies queue need to be inserted to queue first before the gentleman...

But i think i need to try first how to actually read the data from the file and put it into Queue before i need to implement the priority ...

Hi..
I suppose to have a programe to read a data from a file and enqueu it to the Queue.
The programme works like a Priority queue whether the ladies queue need to be inserted to queue first before the gentleman...

But i think i need to try first how to actually read the data from the file and put it into Queue before i need to implement the priority ...

Very good choice

Here is what i try to do but it can't works

Why can't it?

Wouldn't it be easier if you told us what makes you think it can't work?

You don't want to be using insertion operators on infile.
infile << name; will output(insert) a character, name, to infile. You want to be reading(extracting) stuff in.
infile >> name;
I'm no whiz-genius but I think that'll grab a line of text from infile and stuff it into the 'name' variable. I noticed you included <string.h> but I didn't see any declaration of string variables.
Perhaps instead of, char name[MAX]; you could simply use
string name;

I have only used a text file with a single integer value on each line and the code I was using to add each integer to a stack looked like this:

(Remember your Person constructor is shonky also. Set variable i to a value before comparing it to MAX, which you might not have to do if you use string variables.)
You might change also your text file to look like this:

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...