Tag Info

New answers tagged


If you want to aim for a real class, I would recommend C++ if that's how you want to organize your project. However C is still totally appropriate for OpenGL. If I'm not mistaken a totally appropriate C way of doing something class-like would be: // Shader.h struct Shader{ GLuint id; } Shader* createShader(char* vertexSource, char* pixelSource); void ...


In your Database_ExpandSize() function: struct Address* startAddress = tempAddrRows; ... //reallocate temp address to double size and bring it back to start address tempAddrRows = realloc(tempAddrRows,db->maxrows * 2 * sizeof(struct Address)); tempAddrRows = startAddress; You first reallocate your data with twice the size but then you overwrite the ...

Top 50 recent answers are included