001_hello.zig 481 B

123456789101112131415161718192021
  1. //
  2. // Oh no, this is supposed to print "Hello world!" but it needs
  3. // your help.
  4. //
  5. // Zig functions are private by default but the main() function
  6. // should be public.
  7. //
  8. // A function is made public with the "pub" statement like so:
  9. //
  10. // pub fn foo() void {
  11. // ...
  12. // }
  13. //
  14. // Perhaps knowing this will help solve the errors we're getting
  15. // with this little program?
  16. //
  17. const std = @import("std");
  18. fn main() void {
  19. std.debug.print("Hello world!\n", .{});
  20. }