Re: [Dev-C++] What's the difference?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <st...@xs...> - 2003-03-03 18:26:04
|
This really depends on what you're doing. The main benefit to pointers is that you can send them to functions where the function can modify the value of that pointer variable. With normal variables they only get passed by value and since you can only have one return value per function it sometimes becomes necessary to modify the variables within your function rather than calling the funtion multiple times or writing multiple functions that return slightly different variables. Thanks, Steven Quoting Robson Bernard <rob...@su...>: > Hi coders, > > what's the difference between using pointers and using simple variables? How > does this difference affects the performance of my code? I know that using > pointers is working with memory addresses but using simple variables would > not have the same effect? > > int *number or int number: what's the best to be used? > > > Thanks! > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |