Search:

Type: Posts; User: Shokwav

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: Using Scanf??

    by Shokwav
    Replies
    8
    Views
    4,829

    scanf is an evil function. getchar is much better.

    scanf is an evil function. getchar is much better.
  2. I thought genbuffers returned an int for some...

    I thought genbuffers returned an int for some reason :p Thanks guys! (Oh, and I'm using g++ in Eclipse Juno.)
  3. memento::VertexBuffer buff;buff =...

    memento::VertexBuffer<uint> buff;buff = memento::VertexBuffer<uint>();

    this is the only bit where the class in question is utilized...
  4. Where? it highlights the constructor, which makes...

    Where? it highlights the constructor, which makes no sense...
  5. "..\src\VertexBuffers.h: In instantiation of...

    "..\src\VertexBuffers.h: In instantiation of 'memento::VertexBuffer<NumType>::VertexBuffer() [with NumType = unsigned int]':
    ..\src\memento_lib.cpp:31:30: required from here...
  6. "void value not ignored as it ought to be" error?

    can anyone help me with this? i've been trying for 2 hours to fix this... I don't know why I'm getting this?

    Instantiation:


    memento::VertexBuffer<uint> buff;
    buff =...
  7. Replies
    7
    Views
    1,303

    Yeah, I should have said dynamic objects, sorry....

    Yeah, I should have said dynamic objects, sorry.



    Derp, I forgot the *...



    This makes a lot of sense. I was wondering if there was any other deeper purpose, but this makes a lot of sense;...
  8. Replies
    7
    Views
    1,303

    A class... that's dynamic. class foo{}; foo...

    A class... that's dynamic.


    class foo{};
    foo bar = new foo();
  9. Replies
    7
    Views
    1,303

    Purpose of Dynamic Classes?

    Can you someone please expalin to me the purpose of dynamic classes? I know HOW to do it, but I don't know WHY to do it. Arrays I understand, as you usually need the size to be determined at runtime....
  10. Replies
    5
    Views
    1,121

    Not sure what you mean; size_t typedefs to...

    Not sure what you mean; size_t typedefs to unsigned int?
  11. Replies
    5
    Views
    1,121

    Yeah, that worked, thanks. Oops, I thought...

    Yeah, that worked, thanks.

    Oops, I thought npos was private. :p
  12. Replies
    5
    Views
    1,121

    Basic String Iteration Help, Best Solution?

    I've written a sort of... parser, for lack of a better term. What this simple function does is take a string, look for ANY AND ALL control codes (denoted by starting with "[" and ending with "]"),...
  13. Thread: Is this safe?

    by Shokwav
    Replies
    6
    Views
    1,086

    Dammit... alright, and thanks for the eerily...

    Dammit... alright, and thanks for the eerily instantaneous reply o.0
  14. Thread: Is this safe?

    by Shokwav
    Replies
    6
    Views
    1,086

    ...So if it wasn't allocated with new, I...

    ...So if it wasn't allocated with new, I shouldn't do it?
  15. Thread: Is this safe?

    by Shokwav
    Replies
    6
    Views
    1,086

    Is this safe?

    My computer is broken, so I can't test this; is it safe to delete this; on a class that may or may not have been allocated with new? For example:


    class Potpie{
    Potpie(Ingrediants);
    void...
  16. Poll: I have: Graphics superclass (Draw, refresh,...

    I have:
    Graphics superclass (Draw, refresh, printtext, etc.)
    GameObject superclass (Sprites, primitives, etc.)
    Input superclass (Key/Mouse presses)
    Event superclass (Contains flags, contains code...
  17. Replies
    10
    Views
    1,132

    Ah, so I do have to create multiple vectors to...

    Ah, so I do have to create multiple vectors to avoid the data loss of upcasting? Okay, that's what I thought. :P Thank both of you, this has answered my question; your example is also relatively...
  18. Replies
    10
    Views
    1,132

    Thank you, that really helps me; I can just add...

    Thank you, that really helps me; I can just add an extra overloaded method for any new types. However, for the array bit, do you think I should cast them to the base class to be stored in array? The...
  19. Replies
    10
    Views
    1,132

    Most Efficient Way to Do This?

    I'm creating a game. I have a base Image class, with derived Decal and Primitive classes. I also have a seperate class named Frame that holds all Decals and Primitives. What's the best way to go...
  20. Replies
    15
    Views
    2,699

    Yes, yes, yes, I understand that new and delete...

    Yes, yes, yes, I understand that new and delete are used in the libraries themselves; I was never denying that. Thank you all for your help.
  21. Replies
    15
    Views
    2,699

    I don't think I was clear enough in my original...

    I don't think I was clear enough in my original post. I understand what new and delete do. I already know STL uses them, obviously. I just don't see why you'd need them explicitly.
  22. It's still useful to check the text files from...

    It's still useful to check the text files from standard input in GUI mode.
  23. Replies
    15
    Views
    2,699

    C++ Explict Dynamic Memory Allocation - Why?

    I don't really understand why one would want to use new in C++. I know what it does, but I don't understand WHY you'd use it. The main purpose I see is in arrays, but honestly, who uses arrays when...
  24. What's The Deal With __attribute and __attribute__?

    I heard you could utilize in the g++ compiler the __attribute and __attribute__ keywords. What's the difference between these two? If __attribute__((noreturn)) can be used on a void function or a...
  25. Replies
    2
    Views
    1,369

    Ah, yes. Thanks to your help, I fixed code which...

    Ah, yes. Thanks to your help, I fixed code which now runs brilliant as small road animal in mid-summer day. Thank you, SOMA!
Results 1 to 25 of 30
Page 1 of 2 1 2