Thanks for the quick reply. I now feel incredibly stupid. lol
Type: Posts; User: XNOViiCE
Thanks for the quick reply. I now feel incredibly stupid. lol
Hey everyone. I am working with a limited compiler (information you may need to know, I don't really know) and I made this function
void Swap(int &a , int &b);
{
Destination temp;
...
Hey that works! Thanks! Don't really know why I didn't try that yet! XD
string city
int package_count
float total_weight
are the members that are present in Destination right now.
Well the city is the destination of where the shipment has to be dropped off. Would accepting a destination not a city still be a string anyways?
That is the exact error message XD I have to use some limited compiler for some reason. I have the code posted at the top already too, the only difference is that a put in a constructor.
Well when I made the constructor and assigned num to zero it gives me this error "Cannot assign values of type string to a variable of type Destination"
Hey everyone, I am having some difficulties knowing how to assign city to the list. Can anyone help? Thanks!
class DestinationList
{
private:
int num; // number of...
I see the supreme stupidity in my question. Never mind...*facepalm*
Hey everyone. I am doing a program right now where scores from this void function
void ProcessOneGame(int& score1, int& score2 ){
bool GoodScoreCheck;
score1 = ReadScore("enter first...
I would if I could but this is a homework assignment. :b but thanks again!
I see! Thanks! :-D
But can't you already do that without a parameter?
Hey all, I have this function to make and it has to be like this.
int ReadScore( string prompt )
What would the reason of having a prompt parameter?
Thanks in advance!
Elkvis....you sir are a wizard. That some how made it work! :D
Also thank you to everyone that helped out! It helps me a lot!
Its was a move that my partner wanted. Thinking about it now, I'll clean it up.
Oh no the for loops are assigning values to last0/1 , first0/1. The reason I am using the stored value is so that it only puts in the number of characters in the array and no more than that.
I checked the names, the passenger count and I am ment to use strcmp. We are sorting by alphabetical order.
So the results I got were that the compiler only crashes when the names are the same no...
Hmmm. Okay I am going to check that.
Okay so the code has changed a bit now
bool LessThanByName( const Passenger & passenger ) const
{
char last0[MAX_LENGTH + 1];
char last1[MAX_LENGTH + 1];
char...
I will but I am fixing things and I made a bigger problem. :b But I will do that soon!
No I have to use a char array. It is required for it to be used.:p
Hey all. I am having a slight problem with strcmp. I am comparing a two last names and two first names and the problem occurs when two of the same last names are entered. How can I fix this problem?...
Okay I think I understand it all now! Thanks for all the help I think I would have been stuck for a long time if you didn't help! We have learned arrays just he likes making things difficult for us...
Well this seems like it works.
void GetLastName(Name lastName)
{
strcpy(last,lastName);
}
But I don't see the reason for a parameter in a getter.