@taxorubio Yeah, especially important, if you write files in binary mode and don't lock the bit sizes. We had that problem also during the 64 bit migration
Moving our games programming videos - currently Runtime Compiled C++ - to the new dedicated enkisoftware Youtube channel. Consider giving it a subscribe https://www.youtube.com/@enkisoftware
Rapid Development with Runtime Compiled C++ Talk & transcript:
This is a decent introduction to the RCC+ tech I developed with Matthew Jack, and have continued to develop and use in Avoyd. It's an old talk (Develop conf 2012) but still relevant.
Many thanks to @juulcat for videoing the talk and writing up the transcript.
Just looked up how to do callbacks in C++ and YOU CAN'T (unless you write a bunch of templates and wrappers yourself).
When you pass a pointer to non-static member function, yopu need to handle the class pointer yourself. This is like the simplest thing, why can't C++ have that?
Love how the ISO standard website just tells you "Don't". What a joke.
@sos@morten_skaaning The other answer would be of course "just use a lambda" because they work for pretty much all cases, even for C functions that can get a void*
Cross-platform, cross-language development is quite tedious... 🙃
You need to wait for builds to finish, then test on three different OS with different ways to load things.
At least with a Windows machine, you get a Linux environment via WSL2 for free, although it doesn't launch via dotnet run.
And finally you also need access to macOS somehow.
All this time I've been using the return value of snprintf as the number of characters actually written, when it's in fact the number of characters that would be written if the max size passed in were large enough.
In fact: "If the resulting string would be longer than n-1 characters, the remaining characters are discarded and not stored, but counted for the value returned by the function."
@gfxstrand Good to know, will definitely be checking that.
Of course to be sure I should check the behaviour on Windows 11, Windows 10... Windows 8.1, Windows 8... Windows XP, 2000... Windows Me, no just kidding on that last one.