transgalactic
- 1,386
- 0
Code:
string t="rrrrr";
string *p=&t;
strcpy(p, "abc");
i was told that it tells P to point on the data which on the address "abc"
i thought that in order to change the address of a pointer we need to add &
strcpy(&p, "abc");
?
(i know that changing the address into "abc" is not recommended)
Last edited: