Search:

Type: Posts; User: Grins2Pain

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,071

    I get what you mean, but...

    They don't appear to be. What's odd to me is the very concept of overloading NEW. New strikes me as too basic to overload. That's what confuses me.
  2. Replies
    3
    Views
    1,071

    Ok, this is unintelligible to me.

    void* Point::operator new (size_t bytes)
    {
    Block *res = freeList;
    return used < maxPoints
    ? &(blocks[used++])
    : (res == 0 ? 0
    : (freeList = freeList->next, res));
    }
    ...
  3. Replies
    15
    Views
    2,069

    Whats the point of const?

    I've noticed that you can put constants within a class, and then change them as if they were normal values by const flagged member functions. I want to know, what do you expert programmers out there...
  4. Thread: When to WIN

    by Grins2Pain
    Replies
    11
    Views
    1,190

    Wwwwait

    I can use DirectX without Win32 ?! Tell me more!:D

    (I have almost no interest in apps programming, no offense to all the fine applications programmers of the world)
  5. Thread: When to WIN

    by Grins2Pain
    Replies
    11
    Views
    1,190

    When to WIN

    I am now comfortable with classes, pointers, functions, scope, overloading, etc... Now my question is, how much is enough for someone to go ahead and go Win32? To be honest, I really don't want to...
  6. Replies
    29
    Views
    2,405

    He was referring to something else

    Benny, Hybrid was talking about my joke program, the random value setter.

    Hey, I got a question for you and hybrid. I'm interested in getting started with 2D directdraw and direct sound. What...
  7. Replies
    29
    Views
    2,405

    Ah, yes!

    :rolleyes: In the future I'll remember that. I'd almost pay to know exactly what I managed to target by accident. Almost makes me want to make a program that addresses random memory locations with...
  8. Replies
    29
    Views
    2,405

    Yeah, no doubt

    Actually, long term, I want to learn Win32 then MFC, then DirectX. So I'll definately be cracking the books on Win32.

    Tell me, can direct X simply be called fullscreen from a console app, I...
  9. Replies
    29
    Views
    2,405

    Oh, one more thing

    Is there a standard clearscreen command for console apps?
  10. Replies
    29
    Views
    2,405

    One better maybe

    Would it be better to make the array constant to boot?

    EDIT: How can I convert a number grabbed via CIN from a Char number to a INT? I.E. make '1' = 1
  11. Replies
    29
    Views
    2,405

    Yeah, I'm finishing up now...

    Yeah, this program isn't much, it isn't even PONG, but it does feel good to be getting it finished. It's a bad habit to leave programs undone.

    EDIT: By the way, it doesn't have any memory leaks...
  12. Replies
    29
    Views
    2,405

    DOOOOOH!!

    :eek:

    Four hours, four stinking hours I overlooked that!

    Thanks Benny, your eyes are sharper than mine!
  13. Replies
    29
    Views
    2,405

    How so?

    That's a Bool function that's set to return true. What's the problem?
  14. Replies
    29
    Views
    2,405

    Ok, I made the changes...

    Thanks for pointing that out, but it still doesn't work. I think the problem may lie in the functions I am using to actually manipulate the flags, I'll look more closely at the checking routine...
  15. Replies
    29
    Views
    2,405

    Well...

    It DOES compile, but it's almost like I can't effect any change in the elechairs pointer. I am almost completely sure my bit flag check works. For "lowering" a flag, I take 2 to the power of (bit -...
  16. Replies
    29
    Views
    2,405

    Ok, I've butchered this.

    This was a silly little program I made to get a handle on classes, but I think I've really butchered some part of this, can anyone spot my mistake?

    *by the by, it's not entirely finished, but...
  17. Replies
    1
    Views
    1,139

    Agh, what's wrong with this function?

    Can anyone spot anything glaringly wrong with this function? It's supposed to change one of the bit flags in a int with a pass-by referance. If it matters, the int in question is a dynamically...
  18. Replies
    8
    Views
    2,474

    They MAY but they wont by default?

    They COULD BE MADE to point to the same location, but as shown they would be seperate?

    Lyx :) Yeah prolly, sorry, I'll quit making so many posts if it's a problem.

    By the by, do you still need...
  19. Replies
    8
    Views
    2,474

    A equals new int

    So it IS necessary for the constructor to initialize any dynamic variables internal to the class?

    Also, by the way, b1's *a isn't the same value as b2's *a is it? Or would they be seperate values...
  20. Replies
    8
    Views
    2,474

    Classes, dynamic variables, and leaks.

    If I create an instance of a class, and then delete it, I assume that the non-dynamic variables are all cleaned up automatically. The destructor is supposed to be used for dynamically allocated...
  21. Replies
    4
    Views
    1,342

    Ok but...

    Now, this is going to seem REALLY newbish, but in the case of


    aClass *myClass = new aClass;

    do I do


    delete myClass;
  22. Replies
    4
    Views
    1,342

    Dynamically creating an object

    Sorry to post so many newbie questions, but is this correct?


    aClass *myClass = new aClass;

    is, afaik, the way that you creat a new class object dynamically.

    My question is, is this the...
  23. Replies
    3
    Views
    4,423

    RAM vs Cache & Registers

    Does the compiler typically automatically use RAM, or do you have to explicitly tell it to use RAM? Does using ram have something to do with dynamic allocation.

    Sorry if this seems newbish, I...
  24. Replies
    8
    Views
    1,521

    Could you do me a favor?

    Can you omit the delete statement and see if it still outputs garbage?

    On my compiler it outputs exactly what it should.

    The delete statement should, normally, free the memory, right? To me,...
  25. Replies
    8
    Views
    1,521

    Hey thanks :)

    Hey, thanks for the swift response:) I'll do just that!
Results 1 to 25 of 28
Page 1 of 2 1 2