ssercpp12 / Homework

Homework result for 12 sser cpp
1 stars 8 forks source link

In class ListValue, can the parameter(after being used in the function) of the function GetInteger change the value in ListValue? #17

Open SIGNPOINT opened 11 years ago

ssercpp12 commented 11 years ago

Can you please provide a code example that can illustrate your problem?

SIGNPOINT commented 11 years ago

For example:

int num = 10; int* out_value = # GetInteger(0, out_value); *out_value = 100;


Can "*outvalue = 100;" changes the value in list[0]?

ssercpp12 commented 11 years ago

This will no change the value in list_[0]. Because your out_value is point to num.

SIGNPOINT commented 11 years ago

Thanks!