Search:

Type: Posts; User: Draylath

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,468

    Many thanks Elysia

    Many thanks Elysia
  2. Replies
    4
    Views
    1,468

    Thanks Elysia, I have it now. I actually...

    Thanks Elysia,

    I have it now. I actually sorted it before I read your message (that'll teach me to code on the edge of my understanding when I'm tired). Advice on references will be taken. I'll...
  3. Replies
    4
    Views
    1,468

    problem passing pointers to a function

    Hello folks,

    I'm working through the section on pointers in my ebook and I decided to try some things out. I'm finding a it a bit hard going though and I've run into a problem. I'm getting compile...
  4. Replies
    6
    Views
    1,073

    I just worked it out I think I'm just tired...

    I just worked it out
    I think I'm just tired (nearly the end of term). Thanks a lot for your help folks :)
  5. Replies
    6
    Views
    1,073

    I'm sorry. I must have taken stupid pills today....

    I'm sorry. I must have taken stupid pills today.

    I'm not sure why employees[2] is out of bounds as I thought elements in an array number from 0 so it is a 3 element array and the loop should loop...
  6. Replies
    6
    Views
    1,073

    Segmentaion error when using structs

    Hi there,

    I'm trying to learn using stuctures and I've come up with a little thing that combines them with loops and arrays. It might not be a very elegant solution if it did work but instead it...
  7. I hadn't forgotten. All done and done now and...

    I hadn't forgotten. All done and done now and thanks for the input I really appreciate it :D
  8. Thanks for the reply I get it now. The...

    Thanks for the reply

    I get it now. The prototype and definition have to have the return type in the call is just the function name +arguments.

    Cheers
  9. help with passing variables to different functions

    I just want to send an integer to the printout() function to print it but it just seems to get the variable and then exit. What is it I'm doing wrong? Thanks



    #include <iostream>
    using...
  10. Replies
    5
    Views
    1,707

    yes, it was what I wanted except for it ending at...

    yes, it was what I wanted except for it ending at x11 (I wanted it to get to 12 but that was simple to fix). The point about global variables is understood. I just used one here as it is the only one...
  11. Replies
    5
    Views
    1,707

    sorry please disregard! It was so simple even...

    sorry please disregard!

    It was so simple even I worked it out

    Apologies for wasting peoples time
  12. Replies
    5
    Views
    1,707

    Very simple program with unexpected output

    Hello,

    I am writing a very simple program to print out multiplication tables. (I always did stink at maths).

    I think I have it written correctly but I get unexpected out put:


    #include...
  13. got it! I think I need to re read the parts of...

    got it!

    I think I need to re read the parts of my book on the assignment operator and assigning values to variables. I thought that number = p_number and p_number = number would have been the same...
  14. From what I understand so far (which I grant you...

    From what I understand so far (which I grant you is not that much) that should be about right. I've put in variable "number" input from main and assigned p_number that value. Obviously this isn't...
  15. #include using namespace std; ...

    #include <iostream>
    using namespace std;


    class record
    {
    private:
    int p_number;
  16. mmm, now it's back to saying 2 again regardless...

    mmm, now it's back to saying 2 again regardless of input. sorry to keep on about this I just want to get this right
  17. I think I am closer now but it is still not...

    I think I am closer now but it is still not working. I'm getting compiler errors now. I've done the following:

    int main(){
    int number;

    record Clive;
    cout << "set employee...
  18. That'll be the problem then, thanks Jim. You're...

    That'll be the problem then, thanks Jim. You're quite right. I haven't assigned it a value at all have I? Apologies for me getting you to point out the obvious. Thanks again I'll keep bashing away at...
  19. I'm trying to pass the value of int number in the...

    I'm trying to pass the value of int number in the main part of the program into setp_number so that it will set the user input number into Clive and then be retrieved with getp_number. In all my...
  20. Actually I am seriously lost now. Seems I've cut...

    Actually I am seriously lost now. Seems I've cut one head off the hydra :)

    no matter what I input to the p_number it always comes back at me as 2 not what I inputed
  21. oh crap I feel a bit silly now, thanks antred...

    oh crap I feel a bit silly now,

    thanks antred for clearing that up with the system("PAUSE"). I did know about that just my tired mind :)

    I'm lost on your comment on reading what return does but...
  22. A Question/problem with classes and sending a variable to an object

    Hi there,

    sorry if this is really stupid but I am trying as hard as I can to understand classes from a book. I have declared my class and put in the accessor functions and declared everything...
  23. Replies
    4
    Views
    835

    of course! of course!. Thanks so much. I feel a...

    of course! of course!. Thanks so much.
    I feel a little daft now but I think lesson learned. cheers! :D
  24. Replies
    4
    Views
    835

    A Problem understanding operators

    Hi there everyone. This is my first post so I hope I get all the ettiquette right.

    I am just getting started learning C++ from books and am really enjoying it but running into some of the problems...
Results 1 to 24 of 24