Search:

Type: Posts; User: Imanuel

Page 1 of 8 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    2,095

    Very insightful post and thank you for providing...

    Very insightful post and thank you for providing a very good explanation.
  2. Replies
    2
    Views
    2,095

    Clueless where to begin networking.

    This question may qualify as a duplicate or be a candidate for closure so please notify and I am happy to delete it.

    There is a plethora of information on networking in c++. Similar questions...
  3. Replies
    40
    Views
    13,895

    I don't see a problem with the notion of...

    I don't see a problem with the notion of "self-taught" because we are taught or teach ourselves what we know through the process of learning. Any disinterest in learning and teaching (first or third...
  4. Replies
    0
    Views
    906

    std::allocator

    If I choose to reallocate to a new size memory already constructed with a std::allocator, does this alleviate the need to destroy and deallocate prior to reallocation?
  5. Replies
    6
    Views
    2,262

    I don't think why not. I have yet to create a...

    I don't think why not. I have yet to create a Windows Forms program in Visual Studio because I am still learning C++ but WF is suitable to make a GUI application with although I was told c# Forms...
  6. Replies
    4
    Views
    1,186

    Yes and thank you.

    Yes and thank you.
  7. Replies
    1
    Views
    1,023

    sts::allocator::allocate

    When specifying an amount or size_type to the allocate member of the std::allocator, how does that value translate to ::operator new with respect to the number of bytes requested?

    Is it like...
  8. Replies
    6
    Views
    2,262

    Can you be a bit more specific as to the nature...

    Can you be a bit more specific as to the nature of the help needed? I presently write C++ in Visual Studio Professional so I may be of assistance.
  9. Replies
    2
    Views
    1,741

    So my problem was only allocating and not...

    So my problem was only allocating and not simultaneously constructing the memory leading to <Bad Ptr>. Ok thank you.
  10. Replies
    2
    Views
    1,741

    std::allocator

    Not understanding this.



    std::allocator<string> alloc;
    auto const p = alloc.allocate(10);


    Results in p have a <Bad Ptr> upon inspection.
  11. Replies
    4
    Views
    1,186

    Thank you for your reply. Per my text, reference...

    Thank you for your reply. Per my text, reference count increment/decrement happens prior to pointer assignment.
  12. Replies
    15
    Views
    2,581

    I would discourage learning C++ with C. C++ is...

    I would discourage learning C++ with C. C++ is not C with wings. It is a language, at the surface, that differentiates itself from C although, under the hood, much of C++ is backed by C. The...
  13. Replies
    4
    Views
    1,186

    Reference Counting

    Why is it when reference counting, the copy-constructor increments this->counter but the copy-assignment increments ++*rhs.counter?

    I am unable to work out in my head reasons for such. I...
  14. Replies
    3
    Views
    1,232

    This is not making any sense to me. I start two...

    This is not making any sense to me. I start two threads and when they are done, they call join. But what are they joining to? Who or what are they waiting for? Themselves to quit? The function...
  15. Replies
    3
    Views
    1,232

    Thread join() question

    "Blocks the current thread until the thread identified by *this finishes its execution. "

    join() appears similar to function in Java but the description given in cppreference.com is a bit terse...
  16. Can you provide a complete example?

    Can you provide a complete example?
  17. I actually already understood that ... the...

    I actually already understood that ... the primary reason for my compile-time errors. My question was eliciting how to use a unique_ptr inside a container when every container has a copy constructor...
  18. I tried rearranging my code: class World{...

    I tried rearranging my code:



    class World{

    struct UniqueOrganism{
    std::unique_ptr<Organism> unique_organism;

    UniqueOrganism() {}
  19. I need to better understand unique_ptr; allow me to pick your brain

    I wrote some code that produces this:



    1>c:\users\comp sci\documents\visual studio 2010\projects\predatorpreysimulation\predatorpreysimulation\world.h(25): error C2665:...
  20. Replies
    6
    Views
    1,959

    No, I like it. I was just curious if Poo or Boo...

    No, I like it. I was just curious if Poo or Boo could be accessed via Foo but it appears any such access must be polymorphic and your example is quite clear there.
  21. Replies
    32
    Views
    6,083

    Very nice and I appreciate that perspective. By...

    Very nice and I appreciate that perspective. By your post, I would say auto_ptr still has use when applicable and I will try all the solutions given to this thread.
  22. Replies
    6
    Views
    1,959

    No, to access Poo and Boo members through Foo;...

    No, to access Poo and Boo members through Foo; Foo has no members!
  23. Replies
    6
    Views
    1,959

    Inheritance question

    class Foo{
    public:
    };

    class Poo : public Foo{
    // local variables
    public:
    // Accessor/Mutator
    };
  24. Replies
    32
    Views
    6,083

    But a move is not a copy correct? If I move a...

    But a move is not a copy correct? If I move a unique_ptr from one location to another inside a container, that does not entail copy right?

    If this will never work I am happy to use auto_ptr for...
  25. Replies
    32
    Views
    6,083

    I can prob get around no copy or assign of...

    I can prob get around no copy or assign of unique_ptr by returning one from a function which the compiler allows just to stay in keeping with current convention.
Results 1 to 25 of 178
Page 1 of 8 1 2 3 4