Search:

Type: Posts; User: Ewiv

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    17
    Views
    2,006

    I guess I was not the most clear in that one line...

    I guess I was not the most clear in that one line

    std::cout is a function I know this I was trying to say that, what I was implying is you will not do something like

    int cout; at some point in...
  2. Replies
    17
    Views
    2,006

    Then it would be much simpler if the class...

    Then it would be much simpler if the class controlling the list did the adding to the list not another class. I think your over complicating the program a bit and thats causing some of your...
  3. Replies
    17
    Views
    2,006

    You declare a pointer to head, but you never...

    You declare a pointer to head, but you never declare head to point to an actual node

    After setting newNode you should have head point to that to start your list. Doing that means head will point...
  4. Replies
    9
    Views
    4,631

    Well, if you're not in a class and being taught...

    Well, if you're not in a class and being taught to do it that way. IE you are teaching yourself, lets get you off on the right foot. Actually, we should do that either way. :)

    Heres an excellent...
  5. Replies
    7
    Views
    1,435

    Consider watching this video...

    Consider watching this video, Bjarne covers a really neat and safe way to handle file open and close in there that would really benefit your code.
  6. Yea I tend to write my programs like that as...

    Yea I tend to write my programs like that as well. I will get them working and then go back and refine them. I am still learning myself but as I go back and refine them I try and remember for future...
  7. If you want, post op your current code and we'll...

    If you want, post op your current code and we'll help you refine it more. :)

    Otherwise congrats on your conquest and best of luck on climbing the next mountain in your learning process :)
  8. int checkForWinner (string position[3][3]) ...

    int checkForWinner (string position[3][3])


    Has a lot of repeating code. Any time you start seeing repeating code you want to look for ways of turning the repeating code into a function to reduce...
  9. Thread: reverse a string:

    by Ewiv
    Replies
    8
    Views
    863

    As was said it lets you take arguments into your...

    As was said it lets you take arguments into your main function and do something with them. Games use this often to set screen size etc on the fly based on a script file that the user can then change...
  10. So write us a program, if you have problems...

    So write us a program, if you have problems getting it to work, show us the code and we will help you learn. We don't do your homework for you here.
  11. Thread: Classes and FILE

    by Ewiv
    Replies
    2
    Views
    624

    Take a shot at coding it yourself. Google and...

    Take a shot at coding it yourself. Google and your school book are your friend. If you run into problems post us some code so we know you put effort into trying and we can help you get the code...
  12. Replies
    35
    Views
    2,913

    You're accessing memory still, that will display...

    You're accessing memory still, that will display random numbers. Very undesirable behavior.
  13. Replies
    35
    Views
    2,913

    No, lets look at another example int...

    No, lets look at another example


    int foo[10];
    foo[7] = 22;

    fun1(foo[7]); //this passes the value 22 into fun1 because thats what foo[7] equals. However fun1 wants an array so this is a...
  14. Thread: string problem

    by Ewiv
    Replies
    5
    Views
    679

    Yea I agree. The way your using that enum it...

    Yea I agree. The way your using that enum it would be a lot better to have done something like:



    const int MAX = 50;
  15. Thread: Menu program help

    by Ewiv
    Replies
    1
    Views
    1,260

    This while loop will never run. int...

    This while loop will never run.


    int beer_on_the_wall()
    {int i=100;
    while( i <100 && i >=0)
    {
    cout << "Bottles of beer on the wall.";
    i--;
    }
  16. Replies
    13
    Views
    1,327

    You need a pointer to point to that node so you...

    You need a pointer to point to that node so you can delete it after changing the links.
  17. Replies
    35
    Views
    2,399

    Show us your whole main.cpp code so we can see...

    Show us your whole main.cpp code so we can see it.

    What you should be doing is creating a structure. values to the structure and then pass that structure into addObject. I am guessing you are not...
  18. Replies
    13
    Views
    1,327

    Show us some code :)

    Show us some code :)
  19. Thread: array from string

    by Ewiv
    Replies
    7
    Views
    996

    I believe the goal of his assignment is to...

    I believe the goal of his assignment is to iterate through the string printing 1 letter at a time. Advice is awesome, doing the code work for him defeats the purpose and teaches him nothing.
  20. Replies
    35
    Views
    2,399

    Look at like 16 of your code for starters...

    Look at like 16 of your code for starters jocdrew21

    And don't forget your

    #include <string>
  21. Replies
    35
    Views
    2,399

    character.h|11|error: 'Object' was not declared...

    character.h|11|error: 'Object' was not declared in this scope|

    Where is your structure declaration of Object :)
  22. Replies
    16
    Views
    1,747

    Wow, I missed this one the first read through. ...

    Wow, I missed this one the first read through.



    temp = NULL;


    in your first code bracket line 3. Wouldn't that set the argument you are passing in to NULL?
  23. Replies
    16
    Views
    1,747

    From my understand all that does is mean you can...

    From my understand all that does is mean you can use NodePtr or node to refer to that structure. It does not mean you no longer have to declare pointers to that structure as pointer. I may be...
  24. Replies
    16
    Views
    1,747

    NodePtr head; NodePtr current; Not...

    NodePtr head;
    NodePtr current;


    Not pointers, these are variables. I believe you want pointers here.
  25. Replies
    10
    Views
    886

    Give us the code to the functions so we can find...

    Give us the code to the functions so we can find your error. I'm sure you can see as we can see that the 5 lines of code you pasted is not the issue. Post your full solution if you want some help.
Results 1 to 25 of 56
Page 1 of 3 1 2 3