c++ code cons/pros
- by VirusEcks
below i have a code that runs in most of my simple programs .. .
i want to know if it's good/bad ... and cons/pros .
.
win32 header file:
win32.h
#include <windows.h>
#include <process.h>
#include <stdarg.h>
main header file:
inc.h
#include "win32.h"
#ifndef INCS
#define INCS
#define DD
#else
#define DD extern
#endif
#ifndef VARS
#define titlen L"my program"
#endif
DD wchar_t gtitle[512];
DD wchar_t gclass[512];
DD wchar_t gdir[32767];
#include "resources.h"
#include "commonfunctions.h"
then all files have something like this
commonfunctions.h
DD inline bool icmp( const char *String1, const char *String2 )
{
if ( _stricmp( String1, String2 ) == 0 ) { return true; }
return false;
}
DD inline bool scmp( const char *String1, const char *String2 )
{
if ( strcmp( String1, String2 ) == 0 ) { return true; }
return false;
}
all global variables have DD infront of them and all functions have DD too .
is there a bad side of this ? .
i came up with this idea and it wasn't problematic at all in small programs .
but before i apply it in a large project will it be problematic ?.
thanks in advance.