Search:

Type: Posts; User: muusle

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    1,049

    Txn for replay! What confuses me though is the...

    Txn for replay!
    What confuses me though is the struct, the assignment implies that there is a method for extending the struct inside the base class… I might be on completely of course here..
  2. Replies
    3
    Views
    1,049

    Derived datastructur

    Hi,

    What is the best approach to this data structure?
    I have two classes that are almost the same, inn classA I have a protected/private struct that differs slightly from the struct in classB.
    ...
  3. Thread: char* functions

    by muusle
    Replies
    20
    Views
    3,120

    The bzzzzzt in my head is starting to get clearer...

    The bzzzzzt in my head is starting to get clearer now, it’s a wonderful sound! Tanks, again Bee. :D

    I rest my case…



    const char* myStringconst()
    {
    return "FooBar";
    }
  4. Thread: char* functions

    by muusle
    Replies
    20
    Views
    3,120

    Just for the fun of it: const char*...

    Just for the fun of it:


    const char* myStringconst()
    {
    return "Foob";
    }

    int main()
    {
  5. Thread: char* functions

    by muusle
    Replies
    20
    Views
    3,120

    I have one last question about this matter. In a...

    I have one last question about this matter.
    In a larger program, which is potentially running over many days without being restarted: Will this cause a “temporary” memory leakage?
    And with...
  6. Thread: char* functions

    by muusle
    Replies
    20
    Views
    3,120

    Thanks for clarifying, Bee, much appreciated! :)

    Thanks for clarifying, Bee, much appreciated! :)
  7. Thread: char* functions

    by muusle
    Replies
    20
    Views
    3,120

    Ah, I see. But how does this apply to the...

    Ah, I see.
    But how does this apply to the function returning a char pointer?

    If I were to assign the returning value to a variable (which I don’t want to do), I could do:


    const char* foo =...
  8. Thread: char* functions

    by muusle
    Replies
    20
    Views
    3,120

    Tanks! Hehe, right you are! When I said...

    Tanks!

    Hehe, right you are! When I said “special case” I was referring to case you weren’t allocating the memory, I guess it’s not that “special” indeed :p

    But of course, my bad, the...
  9. Thread: char* functions

    by muusle
    Replies
    20
    Views
    3,120

    Good, that’s what my intuition was telling me. ...

    Good, that’s what my intuition was telling me.

    So in other words, the string constant is a “special case” in the world of pointers because the program automatically allocates memory for you, in a...
  10. Thread: char* functions

    by muusle
    Replies
    20
    Views
    3,120

    char* functions

    First it seemed like a good idea, but I’m not so sure anymore.

    What will happen to the content/data this function return?
    Will the content/data properly be deleted when the program terminates,...
Results 1 to 10 of 10