Type: Posts; User: GeoRanger
Search took 0.02 seconds.
October 1st, 2014, 01:27 PM
Thank you both for your interest and responses. :)
Thank you Paul McKenzie for the quote from the Standard. That's the kind of information I was hoping to find.
2kaud, I'm using Visual Studio...
September 30th, 2014, 05:32 PM
I've got the following code which demonstrates a problem and am hoping someone can explain:
September 24th, 2014, 02:08 PM
Thank you three for your responses! :)
My contrived example doesn't do a great job of expressing the real problem. The real problem is an optimization problem where the derived classes...
September 17th, 2014, 03:59 PM
The contrived code below demonstrates a problem I am having in a larger program. I want to have a base class which contains the functionality to assemble a group of objects into a container. ...
September 7th, 2014, 11:19 PM
Are you just looking for the basic but non-obvious syntax?
// The crucial thing to remember here is to read non-trivial pointer declarations backward
// but with grouping by parentheses. So,...
November 19th, 2013, 04:45 PM
Thank you both for your replies! :)
laserlight, I decided to use your idea and it has cured 90% of the issue. I added a small class which is able to give the appearance of being either an array...
November 18th, 2013, 01:34 PM
I have a class in a speed critical program which contains some data to be shared with callers outside the class. The data is reasonably large and copying it should be avoided as much as...
From Paul McKenzie:
Quite true! What fools some programmers into thinking otherwise is that the C Run Time will sometimes check the integrity of the heap in a debug build on calls to delete (or...
April 29th, 2013, 11:46 PM
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...
April 28th, 2013, 07:53 PM
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...
April 18th, 2013, 11:36 PM
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...
April 17th, 2013, 11:25 AM
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...
March 28th, 2013, 11:40 PM
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...
March 1st, 2013, 12:57 AM
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...
February 28th, 2013, 11:07 PM
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...
February 18th, 2013, 03:03 PM
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...
February 13th, 2013, 12:28 AM
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...
December 22nd, 2012, 01:34 AM
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)...
December 21st, 2012, 11:52 PM
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...
November 21st, 2012, 11:07 PM
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...
June 13th, 2012, 12:40 PM
I've got this oddball problem in a much larger program which is replicated by the following code in VS 2010:
January 6th, 2012, 03:01 AM
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...
January 4th, 2012, 11:04 AM
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...
January 3rd, 2012, 04:57 PM
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:
January 3rd, 2012, 01:41 PM
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:
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.