Thanks very much. I didn't look at my code properly. Thanks for your time and help.
Best regards, global
Type: Posts; User: global
Thanks very much. I didn't look at my code properly. Thanks for your time and help.
Best regards, global
Hello,
Thanks in advance for anyone's help and/or advice, it is greatly apprecaited on what, i am sure, is a stupid question. Nevertheless, here is my problem:
I have a template class called...
okinrus, jlou, elad - thank you all!
Your help is very much appreciated, in what can be very trying times for someone trying to get their head around it all. I appreciate the time and effort...
Thank you for your help, it is, as always, greatly received.
So can i have what okinrus posted:
virtual void put(std::ostream& os);
Because i thought you had to have:
So what you're saying is, if i make my inital (super class) implementation of my overloaded operator functions - virtual functions - then i can still access them and use them?
Also, the above...
Hello,
Thank you in advance for your time and help.
I was hoping someone could clear some confusion up, over operator overloading and ineritance.
If i have overloaded the << and the >>...
Thank you for your explanation - i knew that the '&' operator passed something by reference, it's just that, i guess when your starting - your never quite sure whether or not it could mean something...
master5001, sigfriedmcwild - thank you very much for your help.
I did not know that if it has:
Rectangle(const Rectangle&);
...that it signified a copy constructor - but i suppose (thinking...
Hello,
Very quick question.
What does this mean when it is a constructor?
Rectangle(const Rectangle&);
What does this type of constructor receive?
It's better than having a normal function because it is overloaded. You have all the functionality of the normal cout << operator, only with as much other functionality as you want. If you tried to...
yay - i got it to work (when i say 'i', what i mean is 'you' ) - thanks, i changed it to:
return out;
and got rid of the constants.
I am a very happy person.
Thank you for your quick...
Thank you.
I did try that and i got the same error repeated 3 times:
'getName' : cannot convert 'this' pointer from 'const class Student' to 'class Student &'
'getLoan' : cannot convert...
Thank you for your quick reply, it is very much appreciated.
Your code / better implementation of overloading reduced a lot of errors (nearly all of them in fact). I just have a small problem.
...
Hi,
Firstly, many thanks in advance for any help or advice, it is very much appreciated.
I am trying to overload the << operator to output the data members 'loan' and 'name' for my student...
How would i convert it after validation? If i want to input 5 numbers as characters. check convert it, check that it is above 0 and below 9 - how would this be done. I thought this would be easy, but...
Yes, but what if the user enters a letter by mistake?
Thanks for your help, global :)
The problem area is only allowing the user to enter a number between 0 and 90.
Regards, global :)
Yes I want to populate an array with 5 numbers (between 0-9) and check that the user only enteres a number between 0 and 9, then read it out backwards.
Best regards, global :)
I would like to read 5 numbers into an array (between 0 and 9) and check that the user has only entered a number between nought and nine, then print them out backwards.
Regards, global.
ok, i see what your doing, but it does not get me any further, from just using the static conversion. If you enter a 2 digit number with the code above, it will fail. I really do appreciate your...
Sorry, i should have mentioned that i want to be able to handle the user entering a chracter instead of an integer. aDigit[i] would get '56' or '34' as well as '6' or '9' - it's still 1 integer that...
I don't think thats doing much, because i am always getting "please input an integer between 0 and 9" - even if i put 34. Is there a typeof() method in C++ that allows me to output the data type.
...
Thank you very much for your response FillYourBrain, it is very much appreciated. I did not know that aoti() had to make use of a null terminator. So how do you recommend changing my static_cast<int>...
Hello,
I have searched extensively, which is how i know that there are 700+ posts on conversion from char to int. However, i still appear to be stuck. I was initially using the atoi() method. Here...