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

Search:

Type: Posts; User: GeoRanger

Page 1 of 5 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    7
    Views
    212

    Re: Memory Leak in Constructor?

    The only false positives I've ever seen from the CRT leak-checking happen when you allocate and delete memory in a static singleton. Apparently, the CRT initiates the leak-checking when a static...
  2. Replies
    42
    Views
    1,302

    Re: When to use pointers?

    At the risk of sticking my neck out, I wonder if I could give my two cents on the issue of the usage pointers vs. references discussed back in posts 5 through 9 of this thread? (Please excuse me if...
  3. Replies
    3
    Views
    279

    Re: Create new array, the fast way

    This sounds (no pun intended) like it might be a good candidate for offloading to the GPU. If you are using Visual Studio 2012 you can use AMP...
  4. How to substitute correct module when debugging a dump file for Visual Studio 2010?

    Hello:

    I have a dump file from a remote machine which I'm trying to debug. Both the remote machine and my debugger are using Windows 7 with Service Pack 1. The crashing program was built with...
  5. Re: Modifying an existing array with a function

    Sidebar: How do you get the quote icon and the name of the person who said it inside the box?

    This is only my opinion and I know a lot of people, including the designers of the STL, disagree with...
  6. Re: try/catch don't work under release version???

    From amcelroy:

    Well, it largely boils down to what Paul McKenzie was saying in posts #18 and #19. It's the whole "undefined behavior" idea. If the random variable points outside the program's...
  7. Re: try/catch don't work under release version???

    From amcelroy:


    Actually, that is quite easy to do in a non-erroneous way, as long as you are careful not to access any member data or the v-table of the possibly NULL class. (MFC code did it...
  8. Re: How best to prevent memory exhaustion in time-critical dynamic programming?

    I didn't mean to start a war! :)

    Actually, I'm finding the posts from all three of you potentially useful. Unfortunately I've not had the opportunity to try any of these ideas yet four a couple...
  9. How best to prevent memory exhaustion in time-critical dynamic programming?

    Hello:

    I am trying to solve a knapsack problem in a time-critical application. I've found I can shave a couple dozen seconds off of some inputs with dynamic programming. The problem is, the...
  10. Re: Very Simple question about checking zero value ..

    The best way to fix this depends on whether you normally expect to have steep (nearly vertical) lines or whether they can have any orientation.

    In the former case (if lines will always be steep)...
  11. Re: 0xC0000005 - Access violation (Each time from a different dll)

    Adding code to force the CRT to check the integrity of the heap before calling the DLL functions might help. I would do this by running it several times and, each time it crashes, add a call before...
  12. Replies
    5
    Views
    467

    Re: prime chekcer doesnt work

    Won't this misidentify the square of a prime number as a prime?

    For instance, if the argument is 9, then max is 3, the loop iterates only on 2 and doesn't check 3 because of "c < max" (which...
  13. why is inner class only accessible to template specialization if code is inlined?

    Hi:

    I've got this oddball problem in a much larger program which is replicated by the following code in VS 2010:

    DemonstrateIssue.h:



    #ifndef _PROBLEM_CODE_H_INCLUDED_
    #define...
  14. Replies
    13
    Views
    1,204

    Re: std::vector initialization problem

    From Lindley:
    From Paul McKenzie:
    I hadn't thought of simply just sorting an array of pointers to each row, rather than the rows themselves. For the size of the table of exclusions, I don't think...
  15. Replies
    13
    Views
    1,204

    Re: std::vector initialization problem

    The array I'm sorting contains indices into a table of statistical data. The indices describe regions within the table which should be ignored by the analysis performed by "MyRoutine". They have to...
  16. Replies
    13
    Views
    1,204

    Re: std::vector initialization problem

    Thanks you two! I really would like to use std::sort, but I can't get it to compile. This sample I think recreates what I'm running into:



    #include <vector>
    #include <algorithm>

    template...
  17. Replies
    13
    Views
    1,204

    Re: std::vector initialization problem

    Thanks for the responses. :-)

    Apparently vector is safely converted to a raw array, as long as the type is not bool. According to these pages new versions the ISO standard require it:
    ...
  18. Replies
    13
    Views
    1,204

    std::vector initialization problem

    Hello:

    I have some code which needs to allocate a pointer to a list of arrays. The code which uses that pointer can throw exceptions. To prevent leaking the array, I would like to wrap the...
  19. Replies
    3
    Views
    368

    Re: move constructor is ignored?

    Thank you for your interest and response. Looking at it closer, I think you're right. I wrote this a couple of years ago and tried to pass everything around with pointers when possible and I'm...
  20. Replies
    3
    Views
    368

    move constructor is ignored?

    Hi,

    I've just written my first move constructors and move assignment operators. They seem to compile just fine, but when I try to set a breakpoint inside them, the debugger acts like they don't...
  21. Replies
    16
    Views
    1,597

    Re: floating point number formatting question

    You might be able to gain control and flexibility if you print it as two integers:


    #include <math.h>
    void NoTrailingZerosPrintf(double const dValue, unsigned short nDecimalPlaces)
    {
    int...
  22. Re: Why won't this pointer-to-member-function compile?

    I've just figured it out (sort of). Apparently the type information or function signature is lost in the tertiary operator, as if the choice between the two overloads is made apart from the type of...
  23. [RESOLVED] Why won't this pointer-to-member-function compile?

    Hello:

    Given that the following two examples compile without any errors:

    class Tester
    {
    bool FunctionA(int) { return true; }
    bool FunctionA(int, int, int) { return true; }
    bool...
  24. Re: debugger enfeebled by "The activation context being deactivated is not the..."

    This is some kind of problem with Windows 7.

    A coworker is able to duplicate this nasty result with a divide-by-zero on his Windows 7 machine. If we go to Windows XP with VS2008, we instead get...
  25. Re: debugger enfeebled by "The activation context being deactivated is not the..."

    Thanks for your interest in this issue.

    This is very definitely something above-and-beyond the "normal" kinds of issues that you're thinking of.

    I'm sure of this because of the bug I just...
Results 1 to 25 of 120
Page 1 of 5 1 2 3 4



HTML5 Development Center

Click Here to Expand Forum to Full Width