Talk:C:Custom Resource Files

From GPWiki

Files:GUITutorial_warn.gif The Game Programming Wiki has moved! Files:GUITutorial_warn.gif

The wiki is now hosted by GameDev.NET at wiki.gamedev.net. All gpwiki.org content has been moved to the new server.

However, the GPWiki forums are still active! Come say hello.

Warning - Haphazard

At a glance, this file format will not work portably between different compilers/architectures. The number 1. thing you must _never_ do when writing portable code is to write internal representations of objects to files or over the network etc, because it is not guaranteed to work. My representation of an int can most certaintly be different to your representation of an int and maybe not even the same size, and so on. No one should take the advice given in this tutorial as a correct or right way of serializing data. You should either work out a platform neutral format for storing data which does not rely on implementation defined (NOT STANDARDISED) representations of objects. Consider using a library such as http://tpl.sourceforge.net/

Otherwise, if you want to learn how to do the wrong thing then this tutorial is correct. This article should be rewritten reflective of these issues. -jeff 13:40 4 Nov 2007

Missing includes?

Hey, nice tutorial. The code seems to be missing few includes though as it wouldn't compile without including stdlib.h (for the exit() functions) and string.h (for the string comparison and length checking) first.

--Janne 14:00, 9 May 2005 (EDT)

Hi Janne! Welcome to gpwiki :) Regarding the code, it compiles just fine for me. Are you using VC++, by chance? Ryan Clark 14:21, 9 May 2005 (EDT)
What IDE are you using?--Snoolas 14:34, 9 May 2005 (EDT)
Thanks :). I'm using Dev-Cpp 4.9.9.2 with Mingw/GCC 3.4.2 --Janne 15:49, 9 May 2005 (EDT)
That is the exact same thing I'm using, and I can compile it fine. If you continue to have problems, take it up at the forums. We're cluttering up the wiki recent changes page talking here and you will get a larger audience at the forums.--Snoolas 17:22, 9 May 2005 (EDT)
Same here... Dev-Cpp, and it compiles without complaint! Strange >:| Ryan Clark 17:36, 9 May 2005 (EDT)
Change to CodeBlocks insted it is better... Do I have any use of a custom rescource file if I'm doing opensoure software... //Andreas

Removal of Credit?

The last edit here removed the source code author's name. Should we roll that back? Opinions? Codehead 18:12, 12 August 2006 (EDT)

Yeah, a removal of credit without any explanation... I've rolled it back. --Ryan Clark 17:25, 14 August 2006 (EDT)