Thanks, I'll try it.
Type: Posts; User: COBOL2C++
Thanks, I'll try it.
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' :...
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...
Thanks,
After searching around some more I found
sprintf(ansMonths,"$ %.2f",monthlyFee);
Where ansMonths = char ansMonths[10];
and monthlyFee = double monthlyFee = 24.55;
When...
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...
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...
Thanks!!
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?
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,
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...
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;...
Thanks - I took the extra space out but am still getting the same compiler error.
Any suggestions?
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)...
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...
That worked.
Thank you
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...
THE BRACKETS That was it. I guess it just takes a second pay of eyes to see the simple things.
Thanks again.
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]
.....
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.
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,
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...
Thanks for all your help. It worked.
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...
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) + "-" +
...
Thanks, that worked.