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

Search:

Type: Posts; User: positivelyskewed

Search: Search took 0.03 seconds.

  1. Replies
    20
    Views
    2,438

    Re: updating container key values

    Sorry, I haven't been watching this the past couple of days. I've actually thought about the design more, and I do think that although I didn't initially require globally unique names, that it does...
  2. Replies
    20
    Views
    2,438

    Re: updating container key values

    Good point.
  3. Replies
    20
    Views
    2,438

    Re: updating container key values

    So if there were three parameters, I would need to have _1, _2, _3?

    EDIT: I just confirmed this by testing it.
  4. Replies
    20
    Views
    2,438

    Re: updating container key values

    Thanks nuzzle. I really appreciate the advice and I'll look into this type of solution as well.
  5. Replies
    20
    Views
    2,438

    Re: updating container key values

    Thank you! As you might have noticed, I included the boost/bind header because I was trying to do exactly that, but I only tried it with

    p->doOnNameChange(boost::bind(&Container::changeName,...
  6. Replies
    20
    Views
    2,438

    Re: updating container key values

    Thanks for that info. I actually never knew something like that existed, but I like it. I have a follow up question, though. I'm trying to use boost signals to implement what you said, and I want...
  7. Replies
    20
    Views
    2,438

    Re: updating container key values

    Good advice. I see how that could be the case if the names of all prices should be globally unique. However, in this case I only need them to be unique within the container, but I want the price...
  8. Replies
    20
    Views
    2,438

    updating container key values

    I have a container class Price_container that has a private data member of type boost::unordered_map<std::string, std::shared_ptr<Price>> (where Price is a class I've defined).

    I provide a...
  9. Replies
    9
    Views
    11,255

    Re: custom exception class destructor

    That was a very useful example. I actually didn't realize that the first code had that triple deletion thing going on. Looks like I have a lot of reading to do...
  10. Replies
    9
    Views
    11,255

    Re: custom exception class destructor

    Exactly what I'm trying to figure out! Thanks for the tips. I appreciate all of the criticism because I really want to learn how to write good code, not just code that works.
  11. Replies
    9
    Views
    11,255

    Re: custom exception class destructor

    I mistyped. I meant when i = 20. i = 20 is an exceptional case because the forwardcurve array only has 20 elements, so trying to get forwardcurve[20] would be out of the bounds. Is it not good...
  12. Replies
    9
    Views
    11,255

    Re: custom exception class destructor

    Thanks for all of the advice. This isn't really anything I'm going to actually use, I'm just sort of testing out what everything in C++ does.
  13. Replies
    9
    Views
    11,255

    custom exception class destructor

    I have this code that creates a custom exception class which has private data members of type const char*. I want to delete those pointers in the destructor, but since the exception is thrown inside...
Results 1 to 13 of 13





Click Here to Expand Forum to Full Width

Featured