April 29th, 2013 08:42 AM
Now THIS is setting up a stack frame and it has no direct relation to exceptions or stack unwinding.
This is just about starting your function in a "standard way" so that essentially your stack...
April 29th, 2013 08:19 AM
The above may work for your case specifically...
but it is not guaranteed to give you the answer you expect for every possible input (such is the nature of working with floating point).
0.005...
April 29th, 2013 08:09 AM
The principle is easy enough. You just have to figure out the basic idea then working out the recursive function is easy.
Basically
to move the tower from A to B:
you first need to move the...
April 29th, 2013 07:48 AM
it is neither the purpose nor the intention of either pointers or references to "obfuscate".
Pointers have their uses, and so do references. Sometimes their uses are interchangable in which case...
April 26th, 2013 08:39 AM
What Paul hast posted above is correct. floating point values are not an ideal way to deal with for financial type applications that need ACCURACY (floating point numbers are NOT accurate, they're...
April 25th, 2013 08:53 AM
your problem is...
you are calculating values that end up having values that have more digits than 2.
you're only DISPLAYING 2 digits in the report
but the end result with full digits is...
April 25th, 2013 08:09 AM
emmm this isn't right. because it will.
it's the other way around.
GDI will come ask you (or your program rather) via a WM_PAINT if any portion of the program needs repainting.
this can...
April 24th, 2013 10:32 AM
"a""b""c" and "abc" are the same literal string to the compiler. There is no concatenation "in code" happening here, the compiler will merge the strings into a single literal at compile time.
...
April 24th, 2013 10:27 AM
And yet... The compiler cannot KNOW that memory allocated on one thread will never be deallicated in another thread. So the default implementation for any allocator must always assume...
April 24th, 2013 10:15 AM
No.
PROC is not a macro
it's an assembler directive that indicates the logical start of a procedure/function.
Technically you don't even need to use PROC/ENDP to make things work. you could...
April 24th, 2013 09:43 AM
April 23rd, 2013 10:20 AM
1) the standard defines bitfields only for unsigned int, int and signed int. other types may or may not be supported by your compiler
2) the standard only defines the behaviour of bitfields.
3)...
April 23rd, 2013 09:55 AM
or you do what 90% of the apps out there do.
if new/new[] fails, the exe aborts.
:-p
April 22nd, 2013 10:52 AM
There will ALWAYS be a non-zero cost associated with allocation/deallocation. Multithreading may make the effects more dramatic due to synchronisation needs.
I'm not sure how or even if at all...
April 19th, 2013 09:47 AM
Not if there was a function/algorithm that already had that baked in :)
With upper_bound() I don't need to worry about .begin() only about .end() any other return value is valid.
so I'm still...
April 19th, 2013 08:50 AM
"sort of" :) ALthough you're conclusion is the other way around. it's not that the heap should be avoided, but stack should be prefered.
From a performance P.O.V. function local data is...
April 19th, 2013 07:58 AM
I have a std::map<int, foo>
what's the ideal way to get an iterator to the item that has the largest key (int) smaller than a given value.
basically, the item before upper_bound(). I can use...
April 18th, 2013 09:44 AM
if terminal solutions aren't working out for you.
then you will need to figure out how to programmatically control that one program. This doesn't involve RPC at all, it's either messing around...