Search:

Type: Posts; User: ruthgrin

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    6,715

    While I haven't reached the point where I can...

    While I haven't reached the point where I can test this out myself, I believe having two signed variables for velocity (x and y) would do the trick. While this doesn't account for a change of speed...
  2. Replies
    11
    Views
    2,280

    I realise I may be making an unknown number of...

    I realise I may be making an unknown number of incorrect assumptions here, but assuming that the inventory holds objects of type Item and that there is a ceiling to the max inventory size that is...
  3. Replies
    10
    Views
    2,443

    void GetPopulation(int (&Output)[21], int...

    void GetPopulation(int (&Output)[21], int (&Pop)[PopSize][21])

    {
    int index;
    int j;

    /*
    This next loop only runs while the value of index is greater than Popsize. Since...
  4. Replies
    3
    Views
    1,594

    After yet another look through, I realized that...

    After yet another look through, I realized that there was at least one more error where you assign the values for the corners. Perhaps you could try assigning the corner locations inside each box...
  5. Replies
    3
    Views
    1,594

    top1 = object1->y1+ object1->col_y_offset; ...

    top1 = object1->y1+ object1->col_y_offset;
    top2 = object2->y1 + object1->col_y_offset;
    bottom1 = object2->y1 + object1->col_height;
    bottom2 = object2->y2 + object2->col_height;

    ...
  6. Replies
    4
    Views
    2,360

    Just followed your advice and the problem seems...

    Just followed your advice and the problem seems to be fixed.



    I couldn't find anything about an operator>> for use with strings in my documentation on istream so I assumed that I would have to...
  7. Replies
    4
    Views
    2,360

    Problem with atoi()?

    I've done a little program which reads in info from a text file, but there seems to be a problem when I try to output certain numbers.

    Code for the program in question:


    #include <iostream>...
  8. Replies
    7
    Views
    1,102

    I wasn't sure whether in the post 'header'...

    I wasn't sure whether in the post



    'header' was referring to the file the declarations were in, the declaration of the class or its member functions, or something else. Since I'm used to...
  9. Replies
    7
    Views
    1,102

    Thanks again

    I've gotten it to compile and not found any (new) problems.



    I ran a check in the glossary on this site and couldn't find either of them. Can you please explain what exactly they are/represent?...
  10. Replies
    7
    Views
    1,102

    Issue with a templatized class

    I recently tried cleaning up my code by separating it into smaller files and separating class member function declarations and definitions to get around issues relating to 'class has not yet been...
  11. Replies
    14
    Views
    1,732

    Maybe everyone made a new year's resolution to...

    Maybe everyone made a new year's resolution to learn C++/make a 3D game, without realizing the effort involved?
  12. Replies
    13
    Views
    2,029

    I'll try to remember those points. My...

    I'll try to remember those points.



    My orginal intention was simply to make a more space efficient method of achieving runtime polymorphism, even if it was not quite as fast (since none of my...
  13. Replies
    13
    Views
    2,029

    My fault for not explaining. This was a...

    My fault for not explaining. This was a stand-alone example to determine the performance differences, so it consisted of, in effect, two classes each done two different ways. The v classes are...
  14. Replies
    13
    Views
    2,029

    In reply to Rashakil Fol, I compile with...

    In reply to Rashakil Fol, I compile with single-byte alignment so my variables don't have any padding, though I was unaware of the performance implications.

    As for 'macro insanity'/inlining and...
  15. Replies
    13
    Views
    2,029

    The idea is 'runtime polymorphism' without...

    The idea is 'runtime polymorphism' without virtual pointers or (by implication) virtual functions. Instead, each class object is given a type value. When a function is called through a base-class...
  16. Replies
    13
    Views
    2,029

    Maybe I should have explained differently. I'm...

    Maybe I should have explained differently. I'm referring to the amount of space required for the information used for runtime polymorphism, not executable size (besides, I probably ought to learn how...
  17. Replies
    13
    Views
    2,029

    Request for peer review

    I've been working on an alternative method to virtual pointers to achieving runtime polymorphism, with increased space efficiency being the primary concern. While this was simple enough, I found that...
  18. Replies
    4
    Views
    1,194

    Thanks

    I think I've got it working, though I haven't found as many bugs as I expected. Still, that's my problem for now.
  19. Replies
    4
    Views
    1,194

    I know, what I'm trying to do is overload the...

    I know, what I'm trying to do is overload the operators to work with the pointers, but due to the assignment operator being a member function, I don't know how to have the pointer as the left...
  20. Replies
    4
    Views
    1,194

    Troublesome operator overload

    I'm currently attempting to simplify the use of my 'data-type' (var_var) by overloading operators in relation to it. First, an example of its usage:


    class Test { // The test class.
    public: //...
  21. Replies
    12
    Views
    1,253

    Thanks for the help.

    I believe this information will prove enriching, as will the (diversity of terminology?) in your replies. While I am currently encountering other problems in relation to making my little project work...
  22. Replies
    12
    Views
    1,253

    I would've posted sooner, but I've been a bit...

    I would've posted sooner, but I've been a bit occupied. Since my previous attempt at a post just went up in smoke, I'll be comparatively brief.



    Within a minute of logging off. I've since been...
  23. Replies
    12
    Views
    1,253

    Elaboration attempt#1

    I usually have trouble explaining what I'm thinking. I'll try elaborating.

    Reply 1:
    I'm really confused by what you are trying to do. So you want to allocate space for the struct based on the...
  24. Replies
    12
    Views
    1,253

    Asking about base types (eventually)

    My apologies in advance if this is the wrong place for this.

    I'm currently in the early stages of developing a game, specifically creating the 'building blocks'. With this game being turn-based, I...
Results 1 to 24 of 24