Click here to Skip to main content
15,909,373 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Can I make a new view of my document DYNAMICALLY and of a different class than the old view? (SDI Doc/View) Pin
led mike5-Mar-09 4:16
led mike5-Mar-09 4:16 
QuestionLeftMouseClk and Hold it? Pin
Software20075-Mar-09 3:36
Software20075-Mar-09 3:36 
AnswerRe: LeftMouseClk and Hold it? Pin
Cedric Moonen5-Mar-09 3:47
Cedric Moonen5-Mar-09 3:47 
GeneralRe: LeftMouseClk and Hold it? Pin
Software20075-Mar-09 3:50
Software20075-Mar-09 3:50 
AnswerRe: LeftMouseClk and Hold it? Pin
Joseph Marzbani5-Mar-09 3:57
Joseph Marzbani5-Mar-09 3:57 
AnswerRe: LeftMouseClk and Hold it? Pin
Naveen5-Mar-09 4:14
Naveen5-Mar-09 4:14 
GeneralRe: LeftMouseClk and Hold it? [modified] Pin
Software20075-Mar-09 4:19
Software20075-Mar-09 4:19 
QuestionDifferent Between the operator '*' and '&' Pin
jeansea5-Mar-09 3:25
jeansea5-Mar-09 3:25 
the two Different Code create the same result i want to know the

different between the operator '*' and '&'

the code is below:

first:

<br />
#include<iostream><br />
<br />
using namespace std;<br />
<br />
int Add(int &P1,int &P2)<br />
{<br />
	P1=5;<br />
	P2=10;<br />
	return P1+P2;<br />
}<br />
<br />
int main()<br />
{<br />
	int P1=2,P2=3;<br />
	<br />
	cout<<"As Parameter Before The P1 is:"<<P1<<" P2 is:"<<P2<<endl;<br />
<br />
	int Sum=Add(P1,P2);<br />
	cout<<"P1 Parameter After The P1 is: "<<P1<<" P2 is:"<<P2<<endl;<br />
}<br />



Second:
<br />
#include<iostream><br />
<br />
using namespace std;<br />
<br />
int Add(int *P1,int *P2)<br />
{<br />
	*P1=5;<br />
	*P2=10;<br />
	return *P1+*P2;<br />
}<br />
<br />
int main()<br />
{<br />
<br />
		int *P1,*P2;<br />
<br />
		int PA=2,PB=3;<br />
<br />
		P1=&PA;<br />
<br />
		P2=&PB;<br />
	<br />
	cout<<"As Parameter Before The P1 is:"<<*P1<<" P2 is:"<<*P2<<endl;<br />
<br />
	int Sum=Add(P1,P2);<br />
	cout<<"P1 Parameter After The P1 is: "<<*P1<<" P2 is:"<<*P2<<endl;<br />
}<br />


end the variable P1 and P2 's value are all change .

could you tell me the difference between them


thank you Laugh | :laugh:
AnswerRe: Different Between the operator '*' and '&' Pin
Cedric Moonen5-Mar-09 3:45
Cedric Moonen5-Mar-09 3:45 
GeneralRe: Different Between the operator '*' and '&' Pin
«_Superman_»5-Mar-09 17:42
professional«_Superman_»5-Mar-09 17:42 
AnswerRe: Different Between the operator '*' and '&' [modified] Pin
PIEBALDconsult5-Mar-09 3:47
mvePIEBALDconsult5-Mar-09 3:47 
GeneralRe: Different Between the operator '*' and '&' Pin
Cedric Moonen5-Mar-09 3:50
Cedric Moonen5-Mar-09 3:50 
GeneralRe: Different Between the operator '*' and '&' Pin
PIEBALDconsult5-Mar-09 3:55
mvePIEBALDconsult5-Mar-09 3:55 
GeneralRe: Different Between the operator '*' and '&' Pin
bulg5-Mar-09 7:02
bulg5-Mar-09 7:02 
GeneralRe: Different Between the operator '*' and '&' Pin
PIEBALDconsult5-Mar-09 10:38
mvePIEBALDconsult5-Mar-09 10:38 
AnswerRe: Different Between the operator '*' and '&' Pin
jeansea5-Mar-09 4:14
jeansea5-Mar-09 4:14 
AnswerRe: Different Between the operator '*' and '&' Pin
ky_rerun5-Mar-09 4:39
ky_rerun5-Mar-09 4:39 
GeneralRe: Different Between the operator '*' and '&' Pin
jeansea5-Mar-09 5:19
jeansea5-Mar-09 5:19 
GeneralRe: Different Between the operator '*' and '&' Pin
ky_rerun5-Mar-09 5:56
ky_rerun5-Mar-09 5:56 
AnswerRe: Different Between the operator '*' and '&' Pin
Maximilien5-Mar-09 4:42
Maximilien5-Mar-09 4:42 
GeneralRe: Different Between the operator '*' and '&' Pin
PIEBALDconsult5-Mar-09 10:38
mvePIEBALDconsult5-Mar-09 10:38 
GeneralRe: Different Between the operator '*' and '&' Pin
«_Superman_»5-Mar-09 17:34
professional«_Superman_»5-Mar-09 17:34 
QuestionCan anybody let me know how to handle the move event in SDI Pin
ashokbngr5-Mar-09 3:24
ashokbngr5-Mar-09 3:24 
AnswerRe: Can anybody let me know how to handle the move event in SDI Pin
Code-o-mat5-Mar-09 4:02
Code-o-mat5-Mar-09 4:02 
QuestionUnable to control mouse events Pin
AprNgp5-Mar-09 0:23
AprNgp5-Mar-09 0:23 

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.