Search:

Type: Posts; User: global

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,098

    Thanks very much. I didn't look at my code...

    Thanks very much. I didn't look at my code properly. Thanks for your time and help.


    Best regards, global
  2. Replies
    3
    Views
    1,098

    assignment to `char *' from `int *'

    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...
  3. Replies
    9
    Views
    9,163

    okinrus, jlou, elad - thank you all! Your...

    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...
  4. Replies
    9
    Views
    9,163

    Thank you for your help, it is, as always,...

    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:
  5. Replies
    9
    Views
    9,163

    So what you're saying is, if i make my inital...

    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...
  6. Replies
    9
    Views
    9,163

    Inheritance operator overloading

    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 >>...
  7. Replies
    12
    Views
    1,363

    Thank you for your explanation - i knew that 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...
  8. Replies
    12
    Views
    1,363

    master5001, sigfriedmcwild - thank you very much...

    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...
  9. Replies
    12
    Views
    1,363

    V.quick question 'object&'

    Hello,

    Very quick question.

    What does this mean when it is a constructor?

    Rectangle(const Rectangle&);

    What does this type of constructor receive?
  10. It's better than having a normal function because...

    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...
  11. yay - i got it to work (when i say 'i', what i...

    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...
  12. Thank you. I did try that and i got the same...

    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...
  13. Thank you for your quick reply, it is very much...

    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.
    ...
  14. Newbie overloading

    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...
  15. How would i convert it after validation? If i...

    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...
  16. Yes, but what if the user enters a letter by...

    Yes, but what if the user enters a letter by mistake?

    Thanks for your help, global :)
  17. The problem area is only allowing the user to...

    The problem area is only allowing the user to enter a number between 0 and 90.

    Regards, global :)
  18. Yes I want to populate an array with 5 numbers...

    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 :)
  19. I would like to read 5 numbers into an array...

    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.
  20. ok, i see what your doing, but it does not get me...

    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...
  21. Sorry, i should have mentioned that i want to be...

    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...
  22. I don't think thats doing much, because i am...

    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.
    ...
  23. Thank you very much for your response...

    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>...
  24. Conversion, atoi (apologies, searches have been done)

    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...
Results 1 to 24 of 24