Real coding horror... by me! :)
-
First of all, hello. I'm a newbie. Since this section is called Coding Horrors, I thought it would be funny to share this C++ header file I wrote a few days ago: http://www.geocities.com/fruitcake59/Prototype.txt[^] The following tokens are actually macros:
name
,type
,state
,stype
,parent
,ptype
,base
,nodeclare
,notserial
. The two first ones (name
andtype
) MUST be defined before including Prototype.h. The other ones are optional. If you see something like this...#ifdef SOME_TOKEN SOME_TOKEN #undef SOME_TOKEN #endif
... thenSOME_TOKEN
is also an optional macro that can be defined before including Prototype.h. Here's an example of how to use this header file:// This belongs to Instruction.h #pragma once #pragma region Class Names #define name CInstruction #define type INSTRUCTION #define state CInstrState #define stype INSTRSTATE #define parent mpParent #define ptype CModule #define nodeclare #pragma endregion #pragma region Friendships #define CONST_FRIENDSHIPS \ friend class CModule; \ friend struct MODULE; #pragma endregion #pragma region Data Structures #define VAR_ATTRIBUTES \ CStringList slParams; #pragma endregion #pragma region Constructor #define CONSTRUCTOR \ CInstruction(CModule *mpParent); \ CInstruction(CModule *mpParent, CString &sName); #pragma endregion
-
First of all, hello. I'm a newbie. Since this section is called Coding Horrors, I thought it would be funny to share this C++ header file I wrote a few days ago: http://www.geocities.com/fruitcake59/Prototype.txt[^] The following tokens are actually macros:
name
,type
,state
,stype
,parent
,ptype
,base
,nodeclare
,notserial
. The two first ones (name
andtype
) MUST be defined before including Prototype.h. The other ones are optional. If you see something like this...#ifdef SOME_TOKEN SOME_TOKEN #undef SOME_TOKEN #endif
... thenSOME_TOKEN
is also an optional macro that can be defined before including Prototype.h. Here's an example of how to use this header file:// This belongs to Instruction.h #pragma once #pragma region Class Names #define name CInstruction #define type INSTRUCTION #define state CInstrState #define stype INSTRSTATE #define parent mpParent #define ptype CModule #define nodeclare #pragma endregion #pragma region Friendships #define CONST_FRIENDSHIPS \ friend class CModule; \ friend struct MODULE; #pragma endregion #pragma region Data Structures #define VAR_ATTRIBUTES \ CStringList slParams; #pragma endregion #pragma region Constructor #define CONSTRUCTOR \ CInstruction(CModule *mpParent); \ CInstruction(CModule *mpParent, CString &sName); #pragma endregion
:|
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
-
First of all, hello. I'm a newbie. Since this section is called Coding Horrors, I thought it would be funny to share this C++ header file I wrote a few days ago: http://www.geocities.com/fruitcake59/Prototype.txt[^] The following tokens are actually macros:
name
,type
,state
,stype
,parent
,ptype
,base
,nodeclare
,notserial
. The two first ones (name
andtype
) MUST be defined before including Prototype.h. The other ones are optional. If you see something like this...#ifdef SOME_TOKEN SOME_TOKEN #undef SOME_TOKEN #endif
... thenSOME_TOKEN
is also an optional macro that can be defined before including Prototype.h. Here's an example of how to use this header file:// This belongs to Instruction.h #pragma once #pragma region Class Names #define name CInstruction #define type INSTRUCTION #define state CInstrState #define stype INSTRSTATE #define parent mpParent #define ptype CModule #define nodeclare #pragma endregion #pragma region Friendships #define CONST_FRIENDSHIPS \ friend class CModule; \ friend struct MODULE; #pragma endregion #pragma region Data Structures #define VAR_ATTRIBUTES \ CStringList slParams; #pragma endregion #pragma region Constructor #define CONSTRUCTOR \ CInstruction(CModule *mpParent); \ CInstruction(CModule *mpParent, CString &sName); #pragma endregion
Good one, fruitcake.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
-
Good one, fruitcake.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
-
Good one, fruitcake.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
-
sammyamma wrote:
is that a joke indians are good programmers
All Indians? We've come across our fair share of duffers here on Code Project.
Deja View - the feeling that you've seen this post before.
-
Good one, fruitcake.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
-
Justin Perez wrote:
Good one, fruitcake.
At least I get the joke :)
xacc.ide - now with IronScheme support
IronScheme - 1.0 alpha 2 out nowleppie wrote:
At least I get the joke
Oh good. I was actually thinking everyone might miss the reference from the OP
I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
-
The quote in my sig? Yes, the guy who made the comment made it as a joke. The joke isn't about all Indians. Take a look around the forums for a day or 2 and you will see that there are some bad apples.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer