Google simply is not definitive for figuring out any of this C syntax.
Can someone provide the syntax for every variation of initializing TCHAR or char single-byte (non-array) and array strings?
Initialize to a null string.
Initialize to a valid string w/ len of zero.
Initialize to a hex value(s).
Initialize to decimal byte values.
For the TCHAR/char statement itself as well as later, in the BODY of the program (e.g. on-the-fly). I'm looking for simple assignment statements (not for loops).
It seems the compiler treats a NON-array char/tchar differently from one with a [] or [someintegernumber] at definition time.
Also, I've gotten confused. If have gotten rid of all the char in my program and replaced with TCHAR. Everything works.
I am using _tprintf.
Should I use:
_tprintf(L"string");
or
_tprintf(_T"string"); - what header is this _T _TEXT thing in anyway?
While we're here:
#define FRUNREC 0x01 // recurse all directories
#define FRUNDIR 0x02 // return directories
#define FRUNFILE 0x04 // return files
int Frun (TCHAR* Fruni, TCHAR Fruniopb, void (*FrunCB)(TCHAR* FrunCBt)) {
Invoking this function has a peculiarity:
char Frunopb = FRUNDIR | FRUNREC;
TCHAR Frunopbt = { FRUNDIR | FRUNREC };
TCHAR TCHdir[300];
z = Frun( TCHdir, Frunopbt, print1 );
The above has no & before TCHdir and Frunopbt yet one is passed as TCHAR* and the other as TCHAR. Why the difference? My hunch is it has something to do with the TCHAR Frunopbt not being an "array"?