Search:

Type: Posts; User: Halloko

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    34
    Views
    3,681

    I see. That makes more sense. So much to do to...

    I see. That makes more sense.

    So much to do to avoid memory leaks :)
  2. Replies
    34
    Views
    3,681

    I have a follow-up question regarding this: ...

    I have a follow-up question regarding this:

    How do you make, say, a vector handle memory management if you are allocating your objects on the heap which you would probably do to avoid copying...
  3. Replies
    34
    Views
    3,681

    So you would go for the second or third example...

    So you would go for the second or third example presented in my original post?
  4. Replies
    34
    Views
    3,681

    It's fun how you keep talking about error...

    It's fun how you keep talking about error messages. Personally, I'm much more interested in the actual type of error, what caused it and how I can make the application continue. The error message is...
  5. Replies
    34
    Views
    3,681

    You are making a very good point, Mario, and I...

    You are making a very good point, Mario, and I will certainly consider using exceptions more in the future.[/qUOTE]

    HOWEVER, as you said yourself, the memory to deallocate and additional cleaning...
  6. Replies
    34
    Views
    3,681

    But if you are checking the return values anyway,...

    But if you are checking the return values anyway, why not just handle the error locally instead of throwing an exception which is caught in a catch-statement further down?

    Am I missing the point...
  7. Replies
    34
    Views
    3,681

    But what if you wanted to read multiple files and...

    But what if you wanted to read multiple files and you wanted different things to happen based on the file you opened?

    Also, if you wanted to analyze the actual error you'd want to examine the...
  8. Replies
    34
    Views
    3,681

    I guess you have a point. It does also mean,...

    I guess you have a point. It does also mean, however, that you need to wrap every single C-style API you want to use instead of just going for plain error-checking.

    As mentioned earlier, I think...
  9. Replies
    34
    Views
    3,681

    That wasn't really what I meant by...

    That wasn't really what I meant by "old-fashioned". I merely meant that I did things the c-style way, that is, not using exceptions when I could avoid it.

    As has become evident in this thread, for...
  10. Replies
    34
    Views
    3,681

    Yes, I was talking about using exceptions for...

    Yes, I was talking about using exceptions for everything. And I definitely agree that a mixed approach is the way to go. For this particular case, using exceptions definitely seems to be the less...
  11. Replies
    34
    Views
    3,681

    Like vectors and strings, as Daved pointed out?...

    Like vectors and strings, as Daved pointed out? But isn't that pretty much refraining from using new/delete directly?


    I disagree. Using try/catch blocks remove your focus from the actual flow of...
  12. Replies
    34
    Views
    3,681

    I'm a bit old-fashioned (or whatever you'd like...

    I'm a bit old-fashioned (or whatever you'd like to call it). I prefer actually checking return values rather than cluttering my code with try/catch statements.


    I completely agree.


    So you're...
  13. Replies
    34
    Views
    3,681

    Error Handling in Constructor

    Hey,

    Over the past few weeks I've experienced the same dilemma during coding:

    If you want to use the constructor to initialize some class member variables (such as allocating memory), what is...
  14. Replies
    9
    Views
    3,058

    Just to dig further into this. So even though...

    Just to dig further into this. So even though both threads call the same function (that is, they call the same shared member function since they have a pointer to the same class object) the local...
  15. Replies
    2
    Views
    2,555

    Hah, that just tells something about how bad my...

    Hah, that just tells something about how bad my research was before asking :)

    Thanks a lot mate!
  16. Replies
    2
    Views
    2,555

    Passing parameters to modal dialogs

    Hey all,

    I was wondering how you guys cope with passing parameters when creating a modal dialog box.
    Since calling DialogBox() transfers focus to the modal dialog box there's no way to pass any...
  17. Replies
    9
    Views
    3,058

    Awesome! I didn't know that. Guess I'll be...

    Awesome! I didn't know that.

    Guess I'll be switching to critical sections pretty soon :)
  18. Replies
    9
    Views
    3,058

    I usually use mutexes, but it comes out on the...

    I usually use mutexes, but it comes out on the same I guess.
  19. Replies
    9
    Views
    3,058

    Thanks guys. :p

    Thanks guys. :p
  20. Replies
    9
    Views
    3,058

    Classes and Threads

    Hey all,

    Since I'm not sure whether to put this in the C++ or Windows section I'm just going to dump it here.

    I have a question regarding classes and threads. Say you have a class which has two...
  21. Replies
    2
    Views
    2,468

    Thanks for the reply. First of all I'm not...

    Thanks for the reply.

    First of all I'm not using MFC but plain Win32 for this project.
    Second, I'm aiming to link the DLL statically, not dynamically at run-time.

    Do you have an alternative to...
  22. Replies
    2
    Views
    2,468

    Making a DLL which includes an .rc file

    First of all, I realize this has been asked before but they all concerned MFC so I'll just go ahead ;)

    I'm creating a DLL for an application which includes an .rc file with dialogs, bitmaps, etc....
  23. Replies
    16
    Views
    4,393

    Thanks for the helpful replies, guys. I, too,...

    Thanks for the helpful replies, guys. I, too, like to have clean headers and use files with other extensions, such as .cpp, to deal with the actual definitions.

    I'll come up with a style of some...
  24. Replies
    16
    Views
    4,393

    Just to brush up on this reasonably old thread :)...

    Just to brush up on this reasonably old thread :)


    .ipp as in "include-pp file" ? How is that any better than including .cpp files?

    Also, just a quick rehap. So it is required that all...
  25. Replies
    2
    Views
    4,308

    Of course. I found the solution, though. I had...

    Of course.

    I found the solution, though. I had to set the main dialog's Control Parent property to TRUE and all the child dialogs' Control property to TRUE.
Results 1 to 25 of 31
Page 1 of 2 1 2