|
-
August 4th, 2004, 04:56 PM
#1
the most sarcastic error I've ever seen
ok how can this be happenin' ???????
i get this error:
E:\Documents and Settings\Bassouma\Desktop\August\Game Console\Game ConsoleDlg.cpp(308) : error C2664: 'DoIt' : cannot convert parameter 1 from 'class CStatic' to 'class CStatic'
how is it possible that the 2st CStatic can't be converted to the 2nd 
this is toooooo much :'(
Pleased 2 Beat ya 
-
August 4th, 2004, 05:37 PM
#2
wow. I haven't seen that before. Maybe you could post some of the relevant lines
of your code. Until then, dunno.
-
August 4th, 2004, 05:47 PM
#3
That kind of error has happened to me before when I forgot to put a reference parameter in an operator declaration. Please post your code.
-
August 4th, 2004, 07:14 PM
#4
ok here's the function call that makes the problem:
DoIt(m_TTwo,SERIAL);
m_TTwo is a picture control i have <it's type is Cstatic> & SERIAL is int
the func declaration is void CGameConsoleDlg: oIt(CStatic X,int SERIAL)
any ideas ???
Pleased 2 Beat ya 
-
August 4th, 2004, 07:59 PM
#5
Hi,
A better choice might be to pass a pointer to the CStatic rather than declare a whole new CStatic. For example :
Code:
CGameConsoleDlg:DoIt(CStatic *X,int SERIAL)
and then to call the function using the address-of operator:
Code:
DoIt(&m_TTwo,SERIAL);
You'll obnviously need to change the member selection operator ( . to ->) in the function. This might not solve the problem you are having but it is something to consider and try.
-
August 4th, 2004, 08:12 PM
#6
thx man it works
Pleased 2 Beat ya 
-
August 5th, 2004, 12:39 PM
#7
Or pass a reference to avoid passing NULL values:
Code:
CGameConsoleDlg:DoIt(CStatic &X,int SERIAL)
Use:
Code:
DoIt(m_TTwo,SERIAL);
-
August 5th, 2004, 12:56 PM
#8
 Originally Posted by bassouma86
how is it possible that the 2st CStatic can't be converted to the 2nd 
C2664...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|