Help please..

This is a discussion on Help please.. within the C++ Programming forums, part of the General Programming Boards category; >> It means the value returned by getAge() will not change the variable age. Not exactly the full meaning, but ...

  1. #16
    Registered User
    Join Date
    Jan 2005
    Posts
    7,344
    >> It means the value returned by getAge() will not change the variable age.
    Not exactly the full meaning, but that's really off the topic of the thread anyway.

  2. #17
    Registered User
    Join Date
    Nov 2006
    Posts
    7

    Smile

    Quote Originally Posted by Prelude
    >Sorry I had no clue that Salem had such experience, I just needed help.
    No problem, but it's best to assume that the people trying to help you know what they're talking about unless you can prove otherwise. If they do know their stuff, all is well. If not, those of us that do know what we're talking about will call them on it.

    >but I must input a name in that char array nevertheless
    If you need to input a name into that array, then it shouldn't be const.
    Thanks alot, I'm almost certain there is some fault with it being a constant .
    Code:
    void initialize(char[], int *);
    void input(const char [], int &);
    void print(const char *, const int);
    void growOlder(const char [], int *);
    bool comparePeople(const char*, const int *, const char *, const int *);
    In the input function it is declared as a const [] and the other parameter refer to the integer.. Will check this a little more and if I still can't get it to work I'll drop by again. Thanks

  3. #18
    Registered User
    Join Date
    Nov 2006
    Posts
    7

    Thumbs up

    Good god it works ! Thanks for all the help. The fault was that a const char [] got into the function and couldn't be altered. Now I can finally go to sleep later tonight. Will probably need help further on in my studies. Sorry Salem for my naiveness.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21