Search:

Type: Posts; User: stanlvw

Page 1 of 9 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    0
    Views
    1,662

    Visual Studio disable TRACE in debug mode

    I have posted this question on stackoverflow, but none of the solutions seemed to work easily. It would be great if anyone else here can provide any pointers. Thanks in advance.
  2. Easiest way to browse for contents of a folder and store them in a string vector

    What would be the easiest method of finding how many as well as all the filenames present in a selected directory? After that, I'm pretty sure I can store the information into a vector of some sort....
  3. Replies
    2
    Views
    822

    Thanks for the answer and suggestion.

    Thanks for the answer and suggestion.
  4. Replies
    2
    Views
    822

    macro comparison syntax

    For the line below, is there an easy way for me to add a 3rd condition for the case pos == actual_depth? What is the ? ... : ... called?



    actual_depth += (pos > actual_depth ? 1: -1);
  5. Replies
    9
    Views
    1,962

    Would rounding yshow to the nearest integer and...

    Would rounding yshow to the nearest integer and then use the integer to compare in the if statement be a better design?
  6. Replies
    9
    Views
    1,962

    Thanks. I added the figit factor and it works...

    Thanks. I added the figit factor and it works fine now.
  7. Replies
    9
    Views
    1,962

    floating point number comparison

    For the case of yshow = 0.2000000000, when the code goes through the snippet below, the code inside the if statement is executed, which shouldn't happen in this case. Do you happen to know why this...
  8. Replies
    11
    Views
    1,178

    Do you mean the call stack frames leading up to...

    Do you mean the call stack frames leading up to the free() call? I'm pretty sure that I have called free() only once, and nothing was done on the pointers before having memory allocated to the...
  9. Replies
    11
    Views
    1,178

    When I backtraced the call stack from a debugger,...

    When I backtraced the call stack from a debugger, it's coming from a free() call. I have examined all the calls that have used the parameter of free() that I tried to call, and can't find anything...
  10. What happens if I would allocate my_pointer again...

    What happens if I would allocate my_pointer again right after delete? Would it get assigned to an address that has enough memory in the heap?
  11. checking memory/pointer if it's valid before deleting

    I'm trying to find out a proper practice of checking if the pointer/array is valid before calling the delete operator. I know I can check if the pointer is a NULL pointer before deciding whether I...
  12. CString is a MFC variable, specific to Microsoft...

    CString is a MFC variable, specific to Microsoft projects only.
  13. floating point number printf/string formating

    I'm trying to format a certain string as shown in the snippet that I'm posting.



    CString display;
    display.Format("%3.1f", 100*zshow);


    For example, if 100*zshow is 3.5, I would like the...
  14. Replies
    4
    Views
    3,025

    If you are still stuck after going through this,...

    If you are still stuck after going through this, you may want to go ask your question at an OpenGL forum (OpenGL.org Discussion and Help Forums - Powered by UBB.threads™ is an example).
  15. Replies
    7
    Views
    791

    You may want to convert the admission_year member...

    You may want to convert the admission_year member from a string (or stringstream) to an int or float by using atoi or atof. Just a suggestion.
  16. Replies
    11
    Views
    1,178

    sources of segmentation error

    I know that the most common source of segmentation error comes from the programmer writing/reading from memory that has not been allocated by the operating system yet. I'm experiencing a segmentation...
  17. Replies
    6
    Views
    1,033

    From what I see in the optimization settings in...

    From what I see in the optimization settings in the Visual Studio project, no.
  18. Replies
    6
    Views
    1,033

    I think I have found out a potential culprit....

    I think I have found out a potential culprit. delta is a float type. SlavePos is actually a FLOAT type. I'm not sure why they would make a difference, since FLOAT is a Windows typedef of float, but...
  19. Replies
    6
    Views
    1,033

    Only the constructor makes changes to the array,...

    Only the constructor makes changes to the array, and then it's never called again. I have a hard time finding what else is modifying the variable. I checked that the variable is modified within the...
  20. Replies
    6
    Views
    1,033

    Tips for finding scope problems

    I have the following code here. My problem is that when the switch...case block hits nIDEvent == 1, SlavePos structure (which is an array of 6 floating point numbers) is modified by (0, +/- delta, 0,...
  21. Replies
    3
    Views
    856

    What do you mean "internationalizing"? Do you...

    What do you mean "internationalizing"? Do you mean using unicode for printing outputs?
  22. Replies
    7
    Views
    1,894

    I was using Visual Studio debugger. I just typed...

    I was using Visual Studio debugger. I just typed in sizeof(whatever) in the watch window. Not sure how posting a simple compilable program would help.
  23. Replies
    7
    Views
    1,894

    But how does that explain the case when...

    But how does that explain the case when "sizeof(int)" does not return 0 rather than a 4 when I evaluated that value in the debugger?
  24. Replies
    7
    Views
    1,894

    I checked with a debugger again by assigning its...

    I checked with a debugger again by assigning its value to a variable. That variable isn't 0. But when I checked "sizeof(Point2D)" in the debugger, it gives me a value of 0. My confusion is with what...
  25. Replies
    7
    Views
    1,894

    sizeof a struct

    Given that I'm trying to acquire the information of the size of this struct:



    struct Point2D {int x,y;};


    Logically thinking, it should be the size of 2 ints. However, when I checked in...
Results 1 to 25 of 223
Page 1 of 9 1 2 3 4