Array of arrays with default value, dont specify length
Ziggit
Array of arrays with default value, dont specify length
Hi, Im having trouble with initializing an array of strings pub const Foo = struct { bar: []const u8 = "this works ofc", foo: [][]const u8 = .{"this", "fails"}, }; I want a pointer anyway but pub const Foo = struct { foo: *const [][]const u8 = &.{"this", "fails"}, }; const foo = [_][]const u8{"this", "fails"}; pub const Foo = struct { foo: *const [][]const u8 = &foo, }; well im trying for foo to hold an slice, so lets pass an slice since it cant do the casting itself cons...
Hi, Im having trouble with initializing an array of strings pub const Foo = struct { bar: []const u8 = "this works ofc", foo: [][]const u8 = .{"this", "fails"}, }; I want a…
0 comments
No comments yet.