Click here to Skip to main content
15,920,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Convert Int to Byte Pin
Cyrilix11-Jul-07 7:21
Cyrilix11-Jul-07 7:21 
GeneralRe: Convert Int to Byte Pin
simoncoul11-Jul-07 7:52
simoncoul11-Jul-07 7:52 
GeneralRe: Convert Int to Byte Pin
Cyrilix11-Jul-07 8:13
Cyrilix11-Jul-07 8:13 
GeneralRe: Convert Int to Byte Pin
simoncoul11-Jul-07 8:25
simoncoul11-Jul-07 8:25 
QuestionParameter passsing between classes Pin
chaitannya_m11-Jul-07 6:03
chaitannya_m11-Jul-07 6:03 
AnswerRe: Parameter passsing between classes Pin
Electronic7511-Jul-07 6:10
Electronic7511-Jul-07 6:10 
GeneralRe: Parameter passsing between classes Pin
chaitannya_m11-Jul-07 6:54
chaitannya_m11-Jul-07 6:54 
GeneralRe: Parameter passsing between classes Pin
sheshidar11-Jul-07 18:07
sheshidar11-Jul-07 18:07 
I dont know how exactly u had written the class,
I assumed some and written like this..

class A<br />
{<br />
public: <br />
long iSelPackageItemID;<br />
<br />
A()<br />
{<br />
<br />
iSelPackageItemID=100;<br />
}<br />
<br />
//and assigned the value in function...<br />
setPackageID()<br />
{<br />
iSelPackageItemID=200;<br />
<br />
<br />
}<br />
//then i have declared a function <br />
long getPackageID()<br />
{<br />
return iSelPackageItemID;<br />
<br />
}<br />
<br />
<br />
};<br />
<br />
class B<br />
{<br />
public:<br />
	 A ob1;<br />
<br />
<br />
<br />
};<br />
<br />
int main()<br />
{<br />
<br />
<br />
B ob2;<br />
A ob;<br />
cout<<ob.getPackageID()<<endl;<br />
<br />
cout<<ob2.ob1 .getPackageID ()<<endl;<br />
<br />
<br />
<br />
return 0;<br />
<br />
}



if ur code is similar to this than u got the solution.
If this the right solution that ur problem is,
u had given some valsue to iSelPackageItemID in the setPackageID() method, but when u create the onject to class A or B, ur members functions will not call and the valuse of setPackageID is not intialised, so give valuse to setPackageID either in constructor or call the setPackageID() function before calling getPackageID()<< method.
AnswerRe: Parameter passsing between classes Pin
chaitannya_m11-Jul-07 7:29
chaitannya_m11-Jul-07 7:29 
QuestionRe: Parameter passsing between classes Pin
JudyL_MD11-Jul-07 7:40
JudyL_MD11-Jul-07 7:40 
AnswerRe: Parameter passsing between classes Pin
chaitannya_m11-Jul-07 9:04
chaitannya_m11-Jul-07 9:04 
GeneralRe: Parameter passsing between classes Pin
JudyL_MD12-Jul-07 3:41
JudyL_MD12-Jul-07 3:41 
Questionrun an EXE for all users of the computer Pin
rahul398511-Jul-07 5:29
rahul398511-Jul-07 5:29 
QuestionRe: run an EXE for all users of the computer Pin
David Crow11-Jul-07 6:00
David Crow11-Jul-07 6:00 
AnswerRe: run an EXE for all users of the computer Pin
Randor 11-Jul-07 6:22
professional Randor 11-Jul-07 6:22 
QuestionHow to get IDD of a PropertyPage dialog? [modified] Pin
Electronic7511-Jul-07 5:21
Electronic7511-Jul-07 5:21 
AnswerRe: How to get IDD of a PropertyPage dialog? Pin
David Crow11-Jul-07 6:11
David Crow11-Jul-07 6:11 
GeneralRe: How to get IDD of a PropertyPage dialog? Pin
Electronic7511-Jul-07 6:28
Electronic7511-Jul-07 6:28 
Question.hpj errror Pin
sridharsb200711-Jul-07 4:58
sridharsb200711-Jul-07 4:58 
Questiontaking variable value to another class Pin
Maynka11-Jul-07 3:53
Maynka11-Jul-07 3:53 
QuestionRe: taking variable value to another class Pin
David Crow11-Jul-07 4:07
David Crow11-Jul-07 4:07 
AnswerRe: taking variable value to another class Pin
Emmanouil11-Jul-07 4:12
Emmanouil11-Jul-07 4:12 
AnswerRe: taking variable value to another class Pin
sheshidar11-Jul-07 18:21
sheshidar11-Jul-07 18:21 
QuestionRich text format of text Pin
Jhony george11-Jul-07 3:39
Jhony george11-Jul-07 3:39 
AnswerRe: Rich text format of text Pin
Randor 11-Jul-07 6:12
professional Randor 11-Jul-07 6:12 

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.