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

Search:

Type: Posts; User: OReubens

Page 1 of 5 1 2 3 4

Search: Search took 0.13 seconds.

  1. Replies
    5
    Views
    127

    Re: Trouble with GetDIBits()

    BYTE is a char.
    cout << (BYTE)32;
    outputs a character space (ascii value 32), not the value 32.

    to display char's (BYTE's) as numeric values, typecast to int.
  2. Replies
    1
    Views
    84

    Re: GetDIBits() returns wrong BGR values:

    COLORREF[100] is not an array of 24bit RGB values.

    it's an array of COLORREF's
    COLORREF which happen to be defined as a typedef to a DWORD (4bytes)
  3. Replies
    8
    Views
    210

    Re: Design advice required

    i'd like to make point of stating that the "is a" relation is based on the technical implementation/design and NOT on the fysical / real life situation.

    You often see introductory courses on...
  4. Replies
    20
    Views
    443

    Re: A Predator-Prey Simulation

    picking nits... it's not a simulation
    if you run the math for a different range of times, It's a mathematical progression.

    I doubt this is called a "dynamic simulation" because 1) it's not a...
  5. Replies
    20
    Views
    443

    Re: A Predator-Prey Simulation

    I think it's a "can someone do my homework" question :p
  6. Replies
    14
    Views
    291

    Re: Member function pointer assignment

    the function pointer is "without instance" (it is static). it's only when calling the function that you need to supply the instance.

    so mc1.fn1 == mc2.fn1 == MyClass::fn1. All 3 approaches...
  7. Replies
    20
    Views
    443

    Re: A Predator-Prey Simulation

    Actually, this is a math problem. This is't a simulation all the information is static so for a given input there will be a given output.

    A simulation would be about having to deal with things...
  8. Replies
    26
    Views
    765

    Re: A few questions about exception handling

    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...
  9. Replies
    16
    Views
    362

    Re: Calculation Problems

    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...
  10. Replies
    7
    Views
    283

    Re: Towers of Hanoi help

    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...
  11. Replies
    42
    Views
    1,321

    Re: When to use pointers?

    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...
  12. Replies
    16
    Views
    362

    Re: Calculation Problems

    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...
  13. Replies
    16
    Views
    362

    Re: Calculation Problems

    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...
  14. Re: How to arrange work Between WndProc & New Thread

    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...
  15. Re: Pasting "-" does not give a valid preprocessing token

    "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.
    ...
  16. Replies
    42
    Views
    1,321

    Re: When to use pointers?

    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...
  17. Replies
    26
    Views
    765

    Re: A few questions about exception handling

    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...
  18. Re: Memory Management : character arrays and = operator

    codeguru ? :)
  19. Re: Question about unions,bitfields

    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)...
  20. Re: Memory Management : character arrays and = operator

    or you do what 90% of the apps out there do.
    if new/new[] fails, the exe aborts.
    :-p
  21. Replies
    42
    Views
    1,321

    Re: When to use pointers?

    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...
  22. Re: std::map, find largest value smaller than key

    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...
  23. Replies
    42
    Views
    1,321

    Re: When to use pointers?

    "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...
  24. std::map, find largest value smaller than key

    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...
  25. Replies
    4
    Views
    248

    Re: question about RPC

    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...
Results 1 to 25 of 119
Page 1 of 5 1 2 3 4



HTML5 Development Center

Click Here to Expand Forum to Full Width