Search:

Type: Posts; User: rwebb2305

Search: Search took 0.00 seconds.

  1. OK thank you, it's simpler than I thought! And...

    OK thank you, it's simpler than I thought! And yeah, silly mistake with the voids, it's too late for me to think right now.
  2. So it's a prototype of a function? How would I...

    So it's a prototype of a function? How would I intput which function to use? Would it be as simple as:

    void PrintVals(void (*someFunc)(5, 5), 5, 5);
  3. What does this declaration mean void PrintVals(void (*)(int&, int&),int&, int&);

    The title pretty much says it all, what does this declaration mean:

    void PrintVals(void (*)(int&, int&),int&, int&);
    I've been challenged by a book online (recommended from this website, it's...
  4. That was much much simpler and easier to...

    That was much much simpler and easier to understand, thanks a lot!
  5. Thanks for your comments but I'm still stuck... ...

    Thanks for your comments but I'm still stuck...

    I've tried using the strcpy but it's not working (it's the only operator that isn't in the example in the tutorial!). Here's my best attempt so far:...
  6. character arrays (basics, stuck on applying the tutorial)

    I'm working my way through the C++ tutorials and I'm stuck on character arrays. Basically, I don't understand how a user can input a sentence into the program and then how to store that sentence in a...
  7. Replies
    5
    Views
    953

    OK, thanks these posts have helped a lot and I...

    OK, thanks these posts have helped a lot and I think I understand now.
  8. Replies
    5
    Views
    953

    Lesson 9: C-strings and '\n'

    Here's a link to the tutorial: C Strings - C Tutorial - Cprogramming.com

    I'm a little confused on this part of the tutorial:

    #include <iostream>

    using namespace std;

    int main()
    {
  9. That makes it so I do the loop when I input a...

    That makes it so I do the loop when I input a correct value. My aim is for the program to shut down if it's correct, but ask again if an incorrect value is given, until a correct value is entered.
    ...
  10. I want it to loop if there is invalid input, so...

    I want it to loop if there is invalid input, so that if something irrelevant is entered, nothing happens and it just waits for a correct response.

    The
    input == 0 must be wrong, but I'm not sure...
  11. OK, that helps a lot, but the program still...

    OK, that helps a lot, but the program still doesn't function as I want it to.

    It's now set to:

    } while (input==0);
    But when I enter a value that comes to 0, the loop isn't initiated and the...
  12. Replies
    5
    Views
    1,097

    I struggled with that (and apparently still do...

    I struggled with that (and apparently still do after revisiting!) but your problems seem to be:


    cout<<"your age is:"<< age ( x, 2011 - y ) <<"\n";
    This should be written as

    cout<<"your age...
  13. Stuck on tutorial number 5 (basics): switch cases

    http://www.cprogramming.com/tutorial/lesson5.html

    Right at the bottom, it says

    How would I go about doing this? I suppose the do..while loop would be best, so I tried that and here's my best...
Results 1 to 13 of 13