TCHAR Conversion

This won't work in my Unicode defined project/solution --

1
2
3
TCHAR* pdest;

pdest=strrchr(szTitle, _T(","));


IOW, I want to find the last comma in the string.
closed account (z05DSL3A)
_tcsrchr ?

Edit:
I hit delete. :0(
Yep. That worked. I also had to change the quotations to apostrophe.
As much as I like the C runtime string primitives, I have admit the names are pretty unpronouncable rubbish. What I do is open tchar.h and make notepad text file copies of all the macros for preprocessor text substitutions for the functions I use all the time, e.g.,

1
2
3
4
5
6
7
strcpy   wcscpy   _tcscpy
strcat   wcscat    _tcscat
...
...
...
printf   wprintf    _tprintf
etc


I try to keep it handy, but I frequently lose it and have to do it again!
More struct junk, but I figured I'd keep it in the same thread...

"quick_launch_global.h"
1
2
3
4
5
6
extern const int MAXNUM;

struct QUICKLAUNCH {
	TCHAR *lpTitle;
	TCHAR *lpPath;
}


"quick_launch_global.cpp"
1
2
3
const int MAXNUM=50;

QUICKLAUNCH ql[MAXNUM]


or any combination I have tried won't compile. Obviously, I'm trying to make the whole struct global for all .cpp files.
Last edited on
Never mind. It was idiot stuff. I got it figured out.
Topic archived. No new replies allowed.