CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: lanctot

Search: Search took 0.05 seconds.

  1. Replies
    4
    Views
    2,626

    Re: Memory leak detection in linux applications

    Lindley: agreed, it often even helps me find the cause of segfaults faster than gdb...

    htonivi: You may have to compile your code with debug symbols using -g to get backtraces (more detail). This...
  2. Replies
    14
    Views
    10,683

    Re: Templates and Subtypes via inheritance

    Got it.

    OK, FYI it has nothing to do with constness because I just tried it and it works with and without the const. The idea is that the collection/container not be a subtype but to hold...
  3. Replies
    14
    Views
    10,683

    Re: Templates and Subtypes via inheritance

    So, why not? I think I ran into this problem when I was coding a generic subclass in Java and just expected for it to be true.. I don't remember the explanation.. was it only because of the example...
  4. Replies
    14
    Views
    10,683

    Re: Templates and Subtypes via inheritance

    Just for completion I tried out the subtyping relationship I mentioned in my last post. It fails using a dynamic_cast, which I'm puzzled by.. but it works with reinterpret_cast (code below).

    I...
  5. Replies
    14
    Views
    10,683

    Re: Templates and Subtypes via inheritance

    Thanks for all the responses! This is a great forum to have when I need help with C++. As you may tell I've been using Java for the past 5 years and so now re-learning C++ .. last time I'd used it...
  6. Replies
    14
    Views
    10,683

    Re: Templates and Subtypes via inheritance

    Yes, A, B, and C ave virtual functions. That's the point. I'd like listOfStuff<B> to be a sub-type of listOfStuff<A>. In Java you can do that, why wouldn't you be able to in C++? Or are you saying I...
  7. Replies
    14
    Views
    10,683

    Templates and Subtypes via inheritance

    Hi,

    I'm using g++ 4.3.2. I have templated base class, an inherited subclass with specific template types, and I'd like to subclass that type further with subtypes of the template types.. but I...
Results 1 to 7 of 7





Click Here to Expand Forum to Full Width

Featured