Search:

Type: Posts; User: drrcknlsn

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    4,289

    Sprite/tile-based game

    I'm interested in creating a 2-dimensional tile-based game utilizing sprites and such, but I have no idea where to begin. I have a 14 year background in programming console applications in C++, but...
  2. Replies
    2
    Views
    1,534

    Thanks, CornedBee. That's exactly what I was...

    Thanks, CornedBee. That's exactly what I was looking for.
  3. Replies
    2
    Views
    1,534

    Reading an image

    Can anyone point me to a good reference for reading an image pixel by pixel? I need to discern the color information of each pixel for use in a program, but I'm unsure of how to go about it.
    ...
  4. Replies
    17
    Views
    2,052

    It was on the definition line. So would this...

    It was on the definition line.

    So would this be one of the cases where you'd want to return a const pointer instead of a pointer to a const object?

    Edit: Errr... I meant 'accept', not 'return'.
  5. Replies
    17
    Views
    2,052

    OK... I modified what you suggested, but now it's...

    OK... I modified what you suggested, but now it's spitting out "error C2440: '=' : cannot convert from 'const Node *' to 'Node *'



    void setNext ( const Node * pNewNext ) { mpNext =...
  6. Replies
    17
    Views
    2,052

    Why does 'next' need to return a const, but not...

    Why does 'next' need to return a const, but not 'data'?

    And does 'const Node *' translate to 'a constant pointer to a Node object' or 'a pointer to a constant Node object'? From what I've read,...
  7. Replies
    17
    Views
    2,052

    Thanks guys. Incidentally, while I have your...

    Thanks guys.

    Incidentally, while I have your attention, is there a better reference for reading up on const-correctness? I've read the article on this site and a few other brief ones I found on...
  8. Replies
    17
    Views
    2,052

    If I understand correctly, because the object...

    If I understand correctly, because the object owns the object being pointed to, but doesn't manage the memory (the member is just a pointer), then I have to delete it somewhere, and the destructor...
  9. Replies
    17
    Views
    2,052

    MC++/portability

    Because I was introduced to C++ through MSVS.NET, I quickly got used to the managed extensions before learning standard C++. Now, I'm having to go back and relearn a lot of things so that my code is...
  10. Thread: namespaces

    by drrcknlsn
    Replies
    2
    Views
    1,231

    Ah... thanks. I guess I overlooked it since it...

    Ah... thanks. I guess I overlooked it since it normally tells me "unreferenced identifier" when I forget to include the header. Stupid me!
  11. Thread: namespaces

    by drrcknlsn
    Replies
    2
    Views
    1,231

    namespaces

    What would prompt an error telling me that "std is not recognized as a namespace, blah blah blah..." while attempting to use 'std::string'? Obviously std is a namespace, so that error seems rather...
  12. Replies
    7
    Views
    2,384

    ...can't increment before initialization.

    ...can't increment before initialization.
  13. Replies
    14
    Views
    1,623

    Student is supposed to be an abstract class that...

    Student is supposed to be an abstract class that will never be instanced, but I get what you're saying.

    Would it not be more efficient to have a dedicated inquiry method (like virtual bool...
  14. Replies
    14
    Views
    1,623

    Correct - things like uint16 Graduate::GRE(),...

    Correct - things like uint16 Graduate::GRE(), which returns a graduate student's GRE score. While this probably isn't the best example, since all students can take the GRE regardless of...
  15. Replies
    14
    Views
    1,623

    Well, basically... A = student B =...

    Well, basically...

    A = student
    B = undergraduate (inherits student)
    C = graduate (inherits student)
    D = class
    D::x = class role (list of all students in the class)

    So, to send a message to...
  16. Replies
    14
    Views
    1,623

    Right. I didn't think it would work like that,...

    Right. I didn't think it would work like that, which is why I was asking about void *.

    The only other option I can think of that satisfies my requirements is splitting D::x into two different...
  17. Replies
    14
    Views
    1,623

    The only reason isB() exists is so D objects will...

    The only reason isB() exists is so D objects will know whether x() points to a B or C. What would be a better way to test this?



    A pointer to a base class can also point to any derived classes...
  18. Replies
    14
    Views
    1,623

    Dynamic class variable

    I have a base class, A, with an inquiry method bool isB(), and two derived classes, B and C, that inherit from A. I also have a container class, D, with a variable, x, and its respective accessor,...
  19. Thread: Data Types

    by drrcknlsn
    Replies
    7
    Views
    1,344

    That's kind of what I was looking for, I guess. ...

    That's kind of what I was looking for, I guess. I was really hoping there was something like #ifdef ___64BIT___ that would work for all 64-bit processors, and one for 32-bit, etc.
  20. Thread: Data Types

    by drrcknlsn
    Replies
    7
    Views
    1,344

    Data Types

    I know that type "int" is not guaranteed to be a specific size, as well as all of the other primitives, but is there a quick and easy way to dynamically create custom data types that isn't going to...
  21. Replies
    15
    Views
    3,011

    Thanks for the explanation. I think it's all...

    Thanks for the explanation. I think it's all somewhat stupid as well, but to make the implementation as OO as feasibly possible, everything should theoretically be objects, including the class's...
  22. Replies
    15
    Views
    3,011

    I don't suppose you could break this down with an...

    I don't suppose you could break this down with an explanation as to what you're doing, could you? I don't have a good book handy, and I'm having trouble finding examples of most of what you've done...
  23. Replies
    15
    Views
    3,011

    I am trying to get away from returning references...

    I am trying to get away from returning references - hence why I mentioned creating wrapper classes for the primitives.

    I know it takes roughly twice as much memory to store a wrapped primitive...
  24. Replies
    15
    Views
    3,011

    Attributes as objects

    Since primitive types in C++ are not objects and must be turned into objects via wrapper classes in order to use the "attributes as objects" accessor methodology, does this pose a significant risk to...
Results 1 to 24 of 24