Search:

Type: Posts; User: COBOL2C++

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,855

    Thanks, I'll try it.

    Thanks, I'll try it.
  2. Replies
    4
    Views
    1,855

    I added the following code if (intMonths

    I added the following code


    if (intMonths < 1 || intMonths > 999)
    SetFocus(GetDlgItem(hwnd, IDC_EDIT_NUM_MONTHS));


    but was getting a couple of errors.
    error C2065: 'hwnd' :...
  3. Replies
    4
    Views
    1,855

    validate data in a dialog box

    I am displaying a dialog box. On the dialog box I have some edit boxes, raidio buttons, static boxes, push buttons, and check boxes.

    The user enters some information in the edit boxes and clicks...
  4. Replies
    4
    Views
    5,713

    Thanks, After searching around some more I...

    Thanks,

    After searching around some more I found

    sprintf(ansMonths,"$ %.2f",monthlyFee);

    Where ansMonths = char ansMonths[10];
    and monthlyFee = double monthlyFee = 24.55;

    When...
  5. Replies
    4
    Views
    5,713

    SetWindowText()

    My goal is to display a dollar amount in a static text box using the SetWindowText function. Unless there is a better function to use. My amount field is defined as a double but the SetWindowText...
  6. Replies
    3
    Views
    2,321

    radio buttons in group box

    I have 10 radio buttons inside of a group box.

    Is there an easier way of lining up all 10 buttons in the group box instead of trying to resize and move each button individually?

    I am using...
  7. Replies
    9
    Views
    1,576

    Thanks!!

    Thanks!!
  8. Replies
    9
    Views
    1,576

    So the code checks to see if x < y. If that is...

    So the code checks to see if x < y. If that is true then x is returned if it is false then y is returned.

    Is that correct?
  9. Replies
    9
    Views
    1,576

    Thanks, That worked, but I don't understand it. ...

    Thanks, That worked, but I don't understand it.

    What didn't the compiler like about the way I had it?

    What does ?x:y do in the macro?

    Thanks,
  10. Replies
    9
    Views
    1,576

    I removed that space and also remove the "="...

    I removed that space and also remove the "=" signs form the sysbolic constant for NUM1 and NUM2.

    The error are getting fewer but there is still something wrong with the macro defination. Here is...
  11. Replies
    9
    Views
    1,576

    simple macro not working???

    Can anybody tell me why this won't compile. I am trying to understand who macro's work and this seems about as simple as it gets.



    #include <iostream>

    using std::cout;
    using std::cin;...
  12. Replies
    6
    Views
    2,343

    Thanks - I took the extra space out but am still...

    Thanks - I took the extra space out but am still getting the same compiler error.

    Any suggestions?
  13. Replies
    6
    Views
    2,343

    Minimum Macro

    I am trying setup a simple macro that compares 2 numbers and selects the lowest number.

    I found the following example from someelse on the C++ board.

    #define MINIMUM1 (a, b) (((a) < (b)) ? (a)...
  14. Replies
    2
    Views
    1,991

    const char VS global char

    I apologize if this appears twice. The first time I tried to post my computer froze and I had to reboot. I didn't see it posted anywhere so I am trying to post it again.



    I have the following...
  15. Replies
    9
    Views
    1,135

    That worked. Thank you

    That worked.

    Thank you
  16. Replies
    9
    Views
    1,135

    strings to pointers

    I have setup a new class and in that new class I have a private pointer. I need to make that private pointer point to a string, let's say "Good Luck". My compiler doesn't allow me to code my...
  17. Replies
    6
    Views
    968

    THE BRACKETS That was it. I guess it just takes...

    THE BRACKETS That was it. I guess it just takes a second pay of eyes to see the simple things.

    Thanks again.
  18. Replies
    6
    Views
    968

    pointers problems

    I have created a float pointer the following way.

    float *tempPtr;
    tempPtr = new float(14);

    I then display what is in the tempPtr.

    tempPtr[0]
    tempPtr[1]
    .....
  19. Replies
    7
    Views
    3,790

    Unless I find something else I will probably try...

    Unless I find something else I will probably try initializing the elements to a number I know they won't have.

    Thanks for your help.
  20. Replies
    7
    Views
    3,790

    I apoligize I am new and my terminology is a...

    I apoligize I am new and my terminology is a little vague.

    Let's say the length is 10 I need to know many floats are actually in this array? (i.e. Maybe 5 or 7 or even 10)

    Thanks again,
  21. Replies
    7
    Views
    3,790

    comparing two arrays of floats

    I have two array of floats, each could have an undetermined amount of information. strcmp() didn't work and I ma guessing because it is not a string. I got memcmp() to work but I had to hard code...
  22. Replies
    6
    Views
    2,655

    Thanks for all your help. It worked.

    Thanks for all your help. It worked.
  23. Replies
    6
    Views
    2,655

    Thanks, I added that code and was able to...

    Thanks,

    I added that code and was able to compile and run it but I had expected to see the value in newSSN also in newString. Instead newString was empty. Any thouhgts on that.

    Maybe I am on...
  24. Replies
    6
    Views
    2,655

    error converting string to char array

    Can anyone tell me why the folowing is getting on error.

    string orig = 123456789
    string newSSN;
    newSSN = orig.substr(0, 3) + "-" +
    orig.substr(3, 2) + "-" +
    ...
  25. Replies
    2
    Views
    1,588

    Thanks, that worked.

    Thanks, that worked.
Results 1 to 25 of 27
Page 1 of 2 1 2