Search:

Type: Posts; User: ChayHawk

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: Code Review

    by ChayHawk
    Replies
    0
    Views
    861

    Code Review

    So I've been working on a small console game for about a week now, and I would like some feedback on it. I consider it finished, it does exactly what I want it to do. What could be improved? done...
  2. Thread: Composition

    by ChayHawk
    Replies
    11
    Views
    1,025

    So maybe I understand now. So still following the...

    So maybe I understand now. So still following the LearnCPP tutorial, I have this program that derives functions that are virtual:


    #include <iostream>#include <string>
    #include <vector>

    ...
  3. Thread: Composition

    by ChayHawk
    Replies
    11
    Views
    1,025

    Hmm. Ok, I was afraid of that. Do you know any...

    Hmm. Ok, I was afraid of that. Do you know any good sites that teach that type of good oop design? I just want to be able to do game design, idk if that matters but I wont be designing databases or...
  4. Thread: Composition

    by ChayHawk
    Replies
    11
    Views
    1,025

    In regards to overriding behaviour, I was trying...

    In regards to overriding behaviour, I was trying to do it specifically without using virtual yet. I am following the tutorial for it on LearnCPP.com and through several C++ courses on Udemy.

    17.7...
  5. Thread: Composition

    by ChayHawk
    Replies
    11
    Views
    1,025

    No this is the only place it is posted. ...

    No this is the only place it is posted.



    Yeah I have a tendency to do that, I'll change it.



    I think part wouldnt have any child classes, but im not sure. If it did have child classes...
  6. Thread: Composition

    by ChayHawk
    Replies
    11
    Views
    1,025

    Composition

    So i'm learning about composition and i think i got the idea right, but let me know if im wrong, I need to get the part name so i can output it in the operator<< overload function. Static casting...
  7. hmm, thats an interesting way to do it actually....

    hmm, thats an interesting way to do it actually. However I still would like the vector approach because I plan to start using SFML soon and I want to create a simple 2D game and it would require the...
  8. How do I get this to check against each object in...

    How do I get this to check against each object in the vector and if it finds one then it adds collision to it?

    I added a vector with objects and made an iterator to iterate over it but i dont know...
  9. Awesome! thank you!

    Awesome! thank you!
  10. I dont understand why this collision doesnt work

    I am working on a little console game, just messing around with trying to create a 2D game map and be able to move on it and I succeeded in both regards, however, in game worlds you encounter objects...
  11. Replies
    24
    Views
    2,048

    AH ok, yeah VS never gave me that warning, I...

    AH ok, yeah VS never gave me that warning, I probably could have figured that out had it done so. I changed my project to show w4 level warnings but still didnt get any warnings, then tried Wall to...
  12. Replies
    24
    Views
    2,048

    No the example above is just an example, its not...

    No the example above is just an example, its not actual code, the result is the same though. If you run the chromebook compile and try to make 2 different items, it will output like that.

    If you...
  13. Replies
    24
    Views
    2,048

    OH, ok i totally understand now, thank you. now...

    OH, ok i totally understand now, thank you. now the last issue i have is a little strange. when I add items to the map, say I do this:

    Link.AddItem(Rupee, 30);
    Link.AddItem(Rupee, 30):

    Then...
  14. Replies
    24
    Views
    2,048

    Ok so I compiled the code on my chromebook in an...

    Ok so I compiled the code on my chromebook in an android compiler, and i copied it EXACTLY as it was written on my chromebook to Visual studio 2019 on my windows desktop and i'm getting this weird...
  15. Replies
    24
    Views
    2,048

    Ok so i finally got it working, thank you!

    Ok so i finally got it working, thank you!
  16. Replies
    24
    Views
    2,048

    Thank you, I decided to use a map since that...

    Thank you, I decided to use a map since that seems more like what I want, however the overloading doesnt seem to be working, obviousley i'm doing it wrong. I've been looking up how to get it to work...
  17. Replies
    24
    Views
    2,048

    Awesome thank you. Now I have another issue, in...

    Awesome thank you. Now I have another issue, in my inventory where I am going to add stuff to the inventory, I need to search for the first item in the tuple, say im looking for a potion, if the...
  18. Replies
    24
    Views
    2,048

    Quick question, how would I remove the elements...

    Quick question, how would I remove the elements from a vector of pairs or tuples?

    I was trying to figure it out but i dont know if its doable with a pair or tuple, I dont have that code to show...
  19. Replies
    24
    Views
    2,048

    I got it working. After searching for a while I...

    I got it working. After searching for a while I found someone with the same issue as me, so I copied in an answers code and played with it until I got it working.

    Now I just need to figure out how...
  20. Replies
    24
    Views
    2,048

    So this: for(auto& i : inventory) { ...

    So this:


    for(auto& i : inventory) {
    //Error, cannot do this
    inventory.erase(remove(inventory.begin(), inventory.end(), Gold), inventory.end());
    cout << i;
    }
    ...
  21. Replies
    24
    Views
    2,048

    I'll have to re look at that section, I've been...

    I'll have to re look at that section, I've been skipping around a little here and there depending on my needs, but as for the ranged based for loop, it was just something quick to try. In my other...
  22. Replies
    24
    Views
    2,048

    Thank you for the explanation, I'll look at those...

    Thank you for the explanation, I'll look at those links. I'm still looking through the inheritance chapter and re reading it to make sure I really understand it.

    I was working on my code, and I...
  23. Replies
    24
    Views
    2,048

    @Salem, thank you! Ok, yeah I haven't...

    @Salem, thank you!



    Ok, yeah I haven't gotten to virtual yet in the course, that's in the next chapter, but I wanted to make sure I'm doing basic inheritance correctly first before moving on,...
  24. Replies
    24
    Views
    2,048

    How do you overload class constructors?

    I'm re-learning how to create classes and use inheritance from this one site, LearnCPP.com, I am trying to figure something out in my book class. I want to overload the Book constructor to only hold...
  25. And? I like having multiple perspectives, I often...

    And? I like having multiple perspectives, I often post on 3 or 4 different programming forums, I often find people on the same forum generally have a certain way of programming than others so the...
Results 1 to 25 of 34
Page 1 of 2 1 2