cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
x=y; and (*x)=(*y);
x=y; and (*x)=(*y);
Apr 16, 2010 at 4:35pm UTC
abc
(1)
What is the difference?
Apr 16, 2010 at 4:42pm UTC
mackabee
(152)
x = y is assigning the value of y to x
*x = *y is assigning the value pointed by y to the value pointed by x
Apr 16, 2010 at 8:28pm UTC
sammy34
(195)
*x = *y...
This is assuming that x and y are pointers, right? You'll get an 'illegal indirection' error or something if you try and do this with normal variables.
Topic archived. No new replies allowed.