User Profile

Collapse

Profile Sidebar

Collapse
luap
luap
Last Activity: May 10 '07, 02:14 AM
Joined: Mar 17 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • luap
    replied to Matching students to university problem
    in C
    Thanks a lot JosAH, i will try to impliment it with a vector.

    Kind Regards
    See more | Go to post

    Leave a comment:


  • luap
    replied to Matching students to university problem
    in C
    Hello friends,
    i faced with a problem once again.
    I want to write a function which can grow an array. This is my code
    Code:
     #include "stdafx.h"
    #include<iostream>
    using namespace std;
    
    int array_grower(int newarray[], int newsize)
    {
    
    for(int i=0;i < newsize;i++)
    {
    newarray[i]= "array"[i];
    
    return newarray[i] ;
    }
    ...
    See more | Go to post

    Leave a comment:


  • luap
    replied to Matching students to university problem
    in C
    Thanks for the reply and the help, i would like to know, how to create a new thread,

    Thanks in advance.
    See more | Go to post

    Leave a comment:


  • luap
    replied to Matching students to university problem
    in C
    Hello good friends,
    first of all i want to thank you for help, that i have received from you.
    I want start learning c++ from the basics and would like to know if
    it is possible to cut my thread, because it is too long.

    Thanks a lot.
    See more | Go to post

    Leave a comment:


  • luap
    replied to Matching students to university problem
    in C
    Thanks alot for the help
    See more | Go to post

    Leave a comment:


  • luap
    replied to Matching students to university problem
    in C
    Hello friends i need some help,

    i want save the data in struct students by first reading the string and saving them in
    buffer. this what i did.
    And secondly help how to save the array "choice" in the struct?

    Thanks.

    Code:
    struct students
          {
          int id;
    	  double my_average_grade;
          universities choice[6];
          universities average_grade;
    ...
    See more | Go to post

    Leave a comment:


  • luap
    replied to Matching students to university problem
    in C
    unfortunately it did not work

    Code:
    inFile.close(&filename.c_str());
    Code:
    :\dokumente und einstellungen\paul\eigene dateien\visual studio   2005\projects\tutorials\tutorials\tutorials.cpp(86) : error C2102: '&' requires l-value
    See more | Go to post

    Leave a comment:


  • luap
    replied to Matching students to university problem
    in C
    please can someone figure out what the problem could be

    thanks

    Code:
    .. inFile.close(filename.c_str());


    Code:
    tutorials.cpp(68) : error C2660: 'std::basic_ifstream<_Elem,_Traits>::close' : function does not take 1
    See more | Go to post

    Leave a comment:


  • luap
    replied to Matching students to university problem
    in C
    It is rather unfortunate, that thescripts does not want to support me any more. I want to please know , whether i went against any rules and regulations. If I had done something wrong, i never did it with intention. I thought discussionsgrou p will help anyone in need. I really want to learn, because i need this language for my studies.
    I did a bit of c , but now i have to do this Assigment in c++, which i have no idea,so i have to learn the...
    See more | Go to post

    Leave a comment:


  • luap
    replied to Matching students to university problem
    in C
    please i need help in finding out how go get codes numbered in the compier.
    Because without numbering, i can't figure out line. I am using the complier "c++ 2005 Express Edition.

    Thanks
    See more | Go to post

    Leave a comment:


  • luap
    replied to Matching students to university problem
    in C
    could you please explain to what this really means. I can't understand what you mean.
    "And also, if you have to post code please use code tags [code] and the same thing with a / between [ and c to finish (It makes code MUCH easier to read!!!!)"

    Thanks.
    See more | Go to post

    Leave a comment:


  • luap
    replied to Matching students to university problem
    in C
    may i am quite enough get what actually the code tag does. But i am trying again. Sorry if it should cause a problem again
    See more | Go to post
    Last edited by sicarie; Mar 22 '07, 09:49 PM. Reason: Deleted full code as per posting guidelines

    Leave a comment:


  • luap
    replied to Matching students to university problem
    in C
    First and fore most i would like to know how to use the code tag
    And secondly please forgive me for not using the code tag
    please this how code now looks like
    Code:
    }

    Code:
    #/
    See more | Go to post
    Last edited by sicarie; Mar 22 '07, 09:27 PM. Reason: Deleted full code as per posting guidelines

    Leave a comment:


  • luap
    replied to Matching students to university problem
    in C
    First of all thanks so much for the help.

    I have made some changes to my code and this is how it looks like now.

    Code:
    #include "stdafx.h"
    #include <iostream>
    #include <string>
    #include <fstream>
    using namespace std;
    
    
    
    
    
    struct universities
          {
    	  string name;
    	  int places;
    	  double average_grade;
    ...
    See more | Go to post

    Leave a comment:


  • luap
    replied to Matching students to university problem
    in C
    i am a bit confused, how to present the conditional statment.

    I was thinking to compare the students average grade with the universities of their choice and if this true then the student should not be matched to any other university again, and the place of the university should be reduced by one.
    Code:
    for(j=0;j<=50;j++)
    {
    	if(matching_student[no_of_match].match->my_average_grade==matching_student[no_of_matcth.average_grade)
    ...
    See more | Go to post

    Leave a comment:


  • luap
    replied to Matching students to university problem
    in C
    PS this how i think the the students could be properly matched. I am not really sure.

    so i send my code.

    Thanks
    Code:
    #include "stdafx.h"
    #include <iostream>
    #include <string>
    using namespace std;
    
    
    
    
    
    struct universities
          {
    	  string name;
    	  int places;
    	  double average_grade;
    	  }university;
    ...
    See more | Go to post

    Leave a comment:


  • luap
    replied to Matching students to university problem
    in C
    This how i think the problem should be solved. Because not all students will be matched, because of limited number of places available. And for a student to matched to a university, the conditions must be fulfiled 1. average_grade and choice of the universtiy.

    Code:
    //
    #include "stdafx.h"
    #include <iostream>
    #include <string>
    using namespace std;
    ...
    See more | Go to post
    Last edited by Ganon11; Mar 22 '07, 12:04 PM. Reason: code tags added

    Leave a comment:


  • luap
    replied to Matching students to university problem
    in C
    for my akzept i just want to allocate / match a student to a university when there is still a place aviable. This must hold that :

    1.The student has choosen the university and also have the the required grade.
    2. There must be a place free at the university.

    Thanks.
    See more | Go to post

    Leave a comment:


  • luap
    replied to Matching students to university problem
    in C
    i want to arrange the universities in this order: The university with the highest average grade. So my average_grade is to help me change with changing of position, so that after the for loop, the universities would be arraged in order of
    high their averge grade.
    See more | Go to post

    Leave a comment:


  • luap
    replied to Matching students to university problem
    in C
    I took the input file out simply because i wanted to tackle these code first. After that i will try to handle it.



    please i would like to know how to make max_average_gra de compactible with
    universities average_grade, should i max_average_gra de as an array?

    Code:
     :\dokumente und einstellungen\paul\eigene dateien\visual studio 2005\projects\matching\matching\matching.cpp(88) : error C2039: 'max_average_grade'
    ...
    See more | Go to post
    Last edited by Ganon11; Mar 22 '07, 12:06 PM. Reason: code tags added

    Leave a comment:

No activity results to display
Show More
Working...