News for hackers. Stuff that matters.
Re:Systems Programming with Zig (Book) by tredre3 on Saturday October 04, 2025 @04:28PM (#45476409)
To be clear the equivalent C++ code is:

    #include <windows.h>
    extern "C" __declspec(dllimport) int __stdcall MessageBoxA(HWND, LPCSTR, LPCSTR, UINT);
    // or
    extern "C" __declspec(dllimport) int __stdcall MessageBoxA(void *, const char[], const char[], unsigned int);
It's not exactly a stellar improvement.
Re:Systems Programming with Zig (Book) by npalli on Saturday October 04, 2025 @04:34PM (#45476461)
Lol, no this is the equivalent

  #include <windows.h>

 int main() {
      MessageBoxA(NULL, "world!", "Hello", 0);
      return 0;
  }