Thanks a lot JosAH, i will try to impliment it with a vector.
Kind Regards
User Profile
Collapse
-
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] ; }
Leave a comment:
-
Thanks for the reply and the help, i would like to know, how to create a new thread,
Thanks in advance.Leave a comment:
-
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.Leave a comment:
-
-
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;
Leave a comment:
-
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
Leave a comment:
-
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
Leave a comment:
-
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...Leave a comment:
-
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.
ThanksLeave a comment:
-
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.Leave a comment:
-
may i am quite enough get what actually the code tag does. But i am trying again. Sorry if it should cause a problem againLeave a comment:
-
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:#/
Leave a comment:
-
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;
Leave a comment:
-
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)
Leave a comment:
-
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;
Leave a comment:
-
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;
Leave a comment:
-
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.Leave a comment:
-
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.Leave a comment:
-
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'
Leave a comment:
No activity results to display
Show More
Leave a comment: