Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums


Type: Posts; User: Paul McKenzie

Page 1 of 80 1 2 3 4

Search: Search took 0.37 seconds.

  1. Replies

    Re: dynamic array resizing

    Honestly, your assignment doesn't make sense, even if you can't use vector.

    You're creating a dynamic array in main, but then you just call resize() which basically boils down to doing nothing. ...
  2. Re: What could cause a core dump at iterator pre increment??

    Unless it is a container such as std::map, you should strive to not erase elements in a container while you're looping over the same container. I have seen too many code examples where the coder is...
  3. Replies

    Re: How to use set?

    It does not free the memory that you allocated.

    Ask yourself this -- how would a std::set<char*> know that the pointer that is there points to dynamically allocated memory? It doesn't know.
  4. Re: pointer-to-member array crashes with virtual inheritance

    From 4.11.2 of the ANSI standard:


    Paul McKenzie
  5. Re: pointer-to-member array crashes with virtual inheritance

    Doesn't compile here:


    Paul McKenzie
  6. Replies

    Re: Math Doesn't Match

    Please post the output you're getting now, plus the input you're using.

    Second, just to warn you -- floating point calculations when done on a binary-based system such as a computer will not be...
  7. Replies

    Re: How to debug Win32 Message Loop?

    I highly recommend you use a dual monitor for debugging GUI issues, where Visual Studio is on one monitor, and your application is on the other monitor. Or get a very large monitor and...
  8. Re: STL functions shows a segmentation fault.

    If a static library is built with _SECURE_SCL=0, the all libraries that link to it that use STL must be built with the same setting.

    As to your code "working" on OS and not another machine --...
  9. Re: A question regarding throwing an exception

    It isn't just a "good practice". You cannot allow exceptions to leave a destructor, period. Therefore you have no choice but to catch anything before the destructor completes.
  10. Re: Can two functions in same DLL be called by two threads?

    How are you suspending the thread? If you're using SuspendThread, that shouldn't be used for synchronization.
  11. Re: Developing Unmanaged aplications in VS2013 to Work Just Like VC6 Did

    Choose the "Multi-Thread" version of the runtime library in the Project Settings instead of the "Multi-threaded DLL" version. (Properties -> C/C++ -> Code Generation -> Runtime Library).

  12. Re: string::pop_back: Build error in DevC++

    DevC++ is not a compiler, it is an IDE. The compiler that comes with DevC++ is an old version of g++ that does not support string::pop_back. So the solution is to get a more modern compiler (g++...
  13. Replies

    Re: Why I cannot open tiff file?

    Press Retry, look at the call stack, and inspect which functions were called that led up to the error. Since libTiff has full source code, you can easily see what is being done and the cause for the...
  14. Replies

    Re: what's wrong with this program

    What is
    sizeof(myarray) in that line of code? It is sizeof(int) * 10, which is probably 40 bytes (assuming int's are 4 bytes). Then this:

    What is
    sizeof(myarray) in that code? it is...
  15. Re: A question regarding forward slash and back slash

    A forward slash can be used in any standard C++ or C file I/O function as the directory separator.

    For specific Windows API functions, then you must be careful as to the direction of the...
  16. Re: About returning QSharedPointer or raw pointer

    1) I don't know what your question is. You mention QSharedPointer (I guess it is similar to std::shared_ptr) and a raw pointer, but no real question.

    2) You can't stop the user from doing stupid...
  17. Replies

    Re: std::map, insert() issue

    Maybe because the key type and mapped types could go through a silent conversion, given you the other two argument constructor being called (which could lead to hard to find bugs even though the code...
  18. Replies

    Re: [RESOLVED] Displaying a jpeg image

    Those people do not know what they're talking about.

    Even if you don't do any GUI or MFC, C++ by itself is not an easy language, and is definitely not a "cut and paste" language.

  19. Re: New to C++ need help with assignment.

    So what is the question that you have? Just posting the assignment, code, and asking for "hints" doesn't tell us exactly what you are having problems with.


    Paul McKenzie
  20. Replies

    Re: boost filesystem exception problem

    Yet you only assumed that the only exception thrown are ones that boost knows about.

    First, there is a difference between C++ exceptions, and the Microsoft OS structured exceptions. For example,...
  21. Re: Program runs ONLY if debugger is attached

    It doesn't matter what tool built the DLL or how old the DLL happens to be. You can run DLL's created 15+ years ago with the latest Visual Studio if the DLL's follow certain guidelines.

    If the...
  22. Re: 64 bit compatible library for UUID generator

    1) What version of g++ is it?

    2) Why are you not using the standard library that comes with the compiler? Why are you using STLPort?

    What I'm saying is that STLPort in this day and age is...
  23. Re: 64 bit compatible library for UUID generator

    What compiler are you using where you need stlport?


    Paul McKenzie
  24. Replies

    Re: Blackjack Game

    Then what is your specific question? You didn't post one. So the only thing to assume is that you want us to debug the program. You didn't state "I'm passing a variable x and it changes for some...
  25. Replies

    Re: Blackjack Game

    Did you write the program? If so, then you should be responsible for debugging your own programs. What debugging have you done so far?


    Paul McKenzie
Results 1 to 25 of 2000
Page 1 of 80 1 2 3 4

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


HTML5 Development Center