We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go version
$ go version go version go1.20.1 darwin/arm64
// You can edit this code! // Click here and start typing. package main import ( "fmt" "math/big" ) type Test struct { target big.Int } func OO(input Test) { input.target.Add(&input.target, big.NewInt(2)) } func main() { var yy Test yy.target.SetUint64(0) for i := 0; i < 4; i++ { OO(yy) fmt.Println(yy.target.String()) yy.target.Add(&yy.target, big.NewInt(10)) } fmt.Println(yy.target.String()) } I
I thought the answer was. 0 10 20 30 40
But i got 0 10 22 34 44
The text was updated successfully, but these errors were encountered:
https://pkg.go.dev/math/big#Int
shallow copies of Ints are not supported and may lead to errors.
Sorry, something went wrong.
No branches or pull requests
What version of Go are you using (
go version
)?What did you do?
What did you expect to see?
I thought the answer was.
0
10
20
30
40
But i got
0
10
22
34
44
The text was updated successfully, but these errors were encountered: