Calling methods error no variable printed
Jan 12, 2015 at 1:49am UTC
So ive got 2 methods which I call in LRESULT CALLBACK...
The problem is that when it prints the variable the number is always zero.What I am doing wrong? The name of the phones are static int , and max also is a integer.
Please help me.I need to present in a couple of hours my project and i have no ideea how to solve it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
void Calcul::compare(void )
{TCHAR sdBuffer[50];
HWND hwnd;
HWND TextBox;
if (sonyxperia> max )
max = sonyxperia;
if (samsungs > max)
max =samsungs;
if (nokia105 > max )
max = nokia105;
if (ashagraphite > max)
max = ashagraphite;
if (appleiphone> max)
max = appleiphone;
_stprintf(sdBuffer,_T("%d" ),max);
MessageBox(TextBox, sdBuffer, _T("Your phone is..." ), MB_OK);
}
void Calcul::procentaj1(void )
{ HWND hwnd ;
TCHAR ssBuffer[50];
static int sonyxperia = 7;
x = (sonyxperia /10 )* 100;
y = (samsungs/10 )* 100;
a = (nokia105/10 )* 100;
b = (ashagraphite/10) * 100;
c = (appleiphone/10) * 100;
if (x > procentaj)
x = procentaj;
if (y > procentaj)
y =procentaj;
if (a > procentaj)
a =procentaj;
if (b>procentaj)
b =procentaj;
if (c>procentaj)
c =procentaj;
_stprintf(ssBuffer,_T("%d" ),procentaj);
MessageBox(hwnd, ssBuffer, _T("Procentaj" ), MB_OK);
}
Topic archived. No new replies allowed.