I have start learning c++ and face with this problem.
My problem is a minimization problem. Students are to be matched to University at a
minimised cost.
so i started by constrcting a struct. Please i will like to know if i am on the right path.
Here is my code

You don't say what you want to know. Also, in future, please use a descriptive, searchable subject line. I would suggest that you read the "Before you make a query" thread, then formulate a specific question or questions.

shabbir

26Jun2007 21:50

Re: help

just constructing the struct does not mean you are on the right path or not but I don't understand what is the use of the matching struct.

jomo

26Jun2007 22:36

Re: help

The Problem is a miminimisation problem. Students ofa university have six choices to select their prefered universities.
The universities have limited places and select students according to their grades. The problem is to match as many student as possible at a miminimum cost.
So i started by constructing a struct.

Thanks

jomo

26Jun2007 22:51

Re: help

please is my construction okay?

Thanks

DaWei

26Jun2007 23:48

Re: help

Construction of what? Your compiler will tell you if you have made syntactical errors, providing that you have enabled all errors and warnings (which you should do). No compiler can tell you if your approach is optimal, or even good. Neither can we, because we can't read your mind. Please think about these things in a rational manner, or hire us to come to your house, sit in your chair, and listen to your lectures. We can probably do faily well, given scanty information, but we have been given none.

jomo

27Jun2007 00:08

Re: help

The issue in question is out of about 300 students and 50 universities, one should match as many students as possible subject to the constraint of the university.
please i want to create an array of universities , but i am not sure wheather my code is correct.

university <universities> university_list;

DaWei

27Jun2007 02:14

Re: help

Have you tried your code? Why do you think it is either correct or incorrect? Is your compiler bitching with error messages? Do you think your approach is bad? Do you know what you want, and have attempted to achieve that? If so, how has your approach failed you?

Are you picking up on, at all, what I'm getting at here? If not, you need to go sit behind the barn and watch the cotton grow, while you think. This is a programming forum. We try to answer real questions. There is little chance that we can read your mind or deal with your personal uncertainties.