Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const std = @import("std");
- pub const A = packed struct {
- a: u8,
- b: u24,
- };
- pub const B = packed struct {
- b: u24,
- a: u8,
- };
- pub fn main() !void {
- const stdout = std.io.getStdOut().writer();
- try stdout.print("@sizeOf(A) = {}; @sizeOf(B) = {}", .{ @sizeOf(A), @sizeOf(B) });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement