You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Todd,
In the changeMe function of 04_string-pointer/main.go, you seem to be using the memory allocation for a string of 4 characters ("Todd") to store a string of 5 characters ("Rocky").
Wouldn't the changeMe function be causing memory corruption issues?
Thanks!
Todd,
In the changeMe function of 04_string-pointer/main.go, you seem to be using the memory allocation for a string of 4 characters ("Todd") to store a string of 5 characters ("Rocky").
Wouldn't the changeMe function be causing memory corruption issues?
Thanks!
fmt.Println(z) // 0x82023c080 fmt.Println(*z) // Todd *z = "Rocky" fmt.Println(z) // 0x82023c080 fmt.Println(*z) // Rocky
The text was updated successfully, but these errors were encountered: