Click here to Skip to main content
15,888,968 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Simulating mouse clicks Pin
vipinasda7-Jan-06 12:04
vipinasda7-Jan-06 12:04 
GeneralRe: Simulating mouse clicks Pin
Still learning how to code7-Jan-06 21:15
Still learning how to code7-Jan-06 21:15 
AnswerRe: Simulating mouse clicks Pin
#realJSOP8-Jan-06 3:00
mve#realJSOP8-Jan-06 3:00 
GeneralRe: Simulating mouse clicks Pin
Still learning how to code8-Jan-06 5:41
Still learning how to code8-Jan-06 5:41 
AnswerRe: Simulating mouse clicks Pin
Stephen Hewitt9-Jan-06 11:47
Stephen Hewitt9-Jan-06 11:47 
Question[Message Deleted] Pin
S.C.Wong7-Jan-06 6:08
S.C.Wong7-Jan-06 6:08 
AnswerRe: How to add an ActiveX control in another ActiveX control? Pin
Prakash Nadar7-Jan-06 18:05
Prakash Nadar7-Jan-06 18:05 
Questionhow to pass a class ,object to a function by using pointers? Pin
neodeaths7-Jan-06 4:32
neodeaths7-Jan-06 4:32 
i am previously ask this question before but i have relise taht my previous question was not easy to understand. Dead | X|


can any one please teach me how i can pass a object to a function using pointers?

this is normally how i pass a normal variable to a function using a pointer:
<br />
void function(int* ptr)<br />
int main()<br />
{<br />
int num1;<br />
function(&num1);<br />
<br />
return 0;<br />
}<br />




wat i wanan do now is something like this:
<br />
class theclass<br />
{<br />
public:<br />
<br />
}<br />
void function(theclass* ptr)<br />
<br />
int main()<br />
{<br />
theclass tc;<br />
function(&tc);<br />
<br />
return 0;<br />
}<br />

so what i am trying to do is replacing the int with the object but it have error so could any one please teach me how to do this??

i will greatly appreciated itRose | [Rose]
AnswerRe: how to pass a class ,object to a function by using pointers? Pin
Prakash Nadar7-Jan-06 4:46
Prakash Nadar7-Jan-06 4:46 
GeneralRe: how to pass a class ,object to a function by using pointers? Pin
neodeaths7-Jan-06 4:56
neodeaths7-Jan-06 4:56 
GeneralRe: how to pass a class ,object to a function by using pointers? Pin
Prakash Nadar7-Jan-06 5:09
Prakash Nadar7-Jan-06 5:09 
GeneralRe: how to pass a class ,object to a function by using pointers? Pin
neodeaths7-Jan-06 5:14
neodeaths7-Jan-06 5:14 
GeneralRe: how to pass a class ,object to a function by using pointers? Pin
Kevin McFarlane7-Jan-06 5:14
Kevin McFarlane7-Jan-06 5:14 
GeneralRe: how to pass a class ,object to a function by using pointers? Pin
Prakash Nadar7-Jan-06 5:17
Prakash Nadar7-Jan-06 5:17 
GeneralAny One Care To Explain Why My Messages are Voted Down? Pin
Prakash Nadar7-Jan-06 21:17
Prakash Nadar7-Jan-06 21:17 
GeneralRe: Any One Care To Explain Why My Messages are Voted Down? Pin
#realJSOP8-Jan-06 3:05
mve#realJSOP8-Jan-06 3:05 
GeneralRe: Any One Care To Explain Why My Messages are Voted Down? Pin
Trollslayer8-Jan-06 3:50
mentorTrollslayer8-Jan-06 3:50 
GeneralRe: Any One Care To Explain Why My Messages are Voted Down? Pin
Prakash Nadar8-Jan-06 4:15
Prakash Nadar8-Jan-06 4:15 
GeneralRe: Any One Care To Explain Why My Messages are Voted Down? Pin
#realJSOP8-Jan-06 7:13
mve#realJSOP8-Jan-06 7:13 
GeneralRe: Any One Care To Explain Why My Messages are Voted Down? Pin
ThatsAlok9-Jan-06 17:30
ThatsAlok9-Jan-06 17:30 
GeneralRe: Any One Care To Explain Why My Messages are Voted Down? Pin
Prakash Nadar9-Jan-06 17:50
Prakash Nadar9-Jan-06 17:50 
GeneralRe: Any One Care To Explain Why My Messages are Voted Down? Pin
ThatsAlok9-Jan-06 17:56
ThatsAlok9-Jan-06 17:56 
GeneralRe: Any One Care To Explain Why My Messages are Voted Down? Pin
ThatsAlok9-Jan-06 17:59
ThatsAlok9-Jan-06 17:59 
GeneralRe: how to pass a class ,object to a function by using pointers? Pin
Kevin McFarlane7-Jan-06 5:14
Kevin McFarlane7-Jan-06 5:14 
QuestionRe: how to pass a class ,object to a function by using pointers? Pin
David Crow7-Jan-06 17:17
David Crow7-Jan-06 17:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.