[Solved] Writing void pointer to binary file

Is it possible that in different program executions the code above is not going to work? Yes, it’s about as possible as 1+1==2. Is this correct? Absolutely. How can I solve the problem? Write and read the array rather than its address: vl_size size = vl_get_type_size(dataType); const void *means = vl_gmm_get_means(gmm) out.write(static_cast<const char*>(means), numComponents * … Read more

[Solved] C binary read and write file

Okay, I don’t really understand what’s going on, but it seems that you cannot trust fseek with SEEK_CUR when using with read/write files in that case (I’m running Windows, and the standard functions are notoriously different from Linux that may be the issue) EDIT: Andrew’s answer confirms my suspicions. My solution complies to what the … Read more

[Solved] Attempting to reduce executable size of Go program [duplicate]

Here are some things that the Go program includes that the C program does not include: Container types, such as hash maps and arrays, and their associated functions Memory allocator, with optimizations for multithreaded programs Concurrent garbage collector Types and functions for threading, such as mutexes, condition variables, channels, and threads Debugging tools like stack … Read more