Skip to content
New issue

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

Mismatched types error in the first example of pointers #5

Open
Anderson-Juhasc opened this issue Jun 21, 2024 · 0 comments
Open

Mismatched types error in the first example of pointers #5

Anderson-Juhasc opened this issue Jun 21, 2024 · 0 comments

Comments

@Anderson-Juhasc
Copy link
Contributor

let x: u8 = 1234521; // requires 1 byte(8 bits) to store "x" in memory
let y: &u128 = &x; // In a 64 bit architecture this will require 64 bits to store "y" in memory
let z: &&u128 = &y; // same bits as y

I'm not sure if casting x to u128 is the better way...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant