473,386 Members | 1,741 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Convert TCHAR [] to const ***

39
HI all,

How 2 convert a TCHAR [] to a char ***

Thanks in advance :)
Mar 30 '10 #1
4 4108
Markus
6,050 Expert 4TB
(char ***)your_tchar_arr;
Mar 30 '10 #2
weaknessforcats
9,208 Expert Mod 8TB
A char*** is not a pointer to an array.

Please read: http://bytes.com/topic/c/insights/77...rrays-revealed

A TCHAR points to either a CHAR or a WCHAR based on the character set of your project. That cast will force a char pointer to point at a WCHAR data type and screw up your code.

Do not cast.

Stick with the TCHAR rules. That means no char, CHAR, PCHAR, WCHAR, LPSTR, LPWSTR, etc in your code. Only TCHAR and the TCHAR mappings and the TCHAR function equivalents.
Mar 30 '10 #3
tezu
39
Thx for teh reply , i think char*** is a two dimensional array ......

My requirement is tht i have a function which returns me TCHAR [] now i have to fill these values into the char*** array ..... how can i do it ???
Mar 31 '10 #4
weaknessforcats
9,208 Expert Mod 8TB
First, you should be clear on the difference between a pointer and an array.

Second, read the article that I indicated. Your last post tells me you did not read this or you wouldn't ask this question.
Mar 31 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Markus Hämmerli | last post by:
I ' ll tra to convert a Cstring to char* without success. I working in a Unicode enabled environment this is working in Unicode CString source = _T("TestString"); TCHAR *szSource =...
7
by: ree | last post by:
I need to use a function from a wininet library, it requires the use of const TCHAR. The problem is the value needs to be calculated, so at the end I have this string but I am having troubles...
4
by: muroogan | last post by:
I read a text file into a char variable char tchar; I want to trim leading spaces (Left trim).How can I do that in C++. Any input will be appreciated.
11
by: **Developer** | last post by:
Need this: typedef struct _SHFILEINFO { HICON hIcon; int iIcon; DWORD dwAttributes; TCHAR szDisplayName; TCHAR szTypeName; } SHFILEINFO
10
by: farseer | last post by:
How can i do this? i'd like to call the following code: .... string url = <my urld>; TCHAR* urlParams = GetParams( ); url.append( (char * ) urlParams ); GotoURL( ( LPCTSTR ) url ); ...
1
by: Bit Byte | last post by:
Are there any macros for converting between these two string types ?
5
by: T. Crane | last post by:
Help! I am trying to figure this out, and I have the impression that it should be really easy, but I'm at a loss. Here's my problem: I want to take the output from const char *...
2
by: Akino877 | last post by:
Hello, I have a small program which uses FindFirstFile() to get a file name. Once I get the file name, I would like to use sscanf to extract certain part of the file name. My program is as...
9
by: =?iso-8859-1?B?S2VyZW0gR/xtcvxrY/w=?= | last post by:
Hi, i am a little stuck here, how do i convert this from C Structure to an structure in C# that can be marshalled: typedef struct _DEV_BROADCAST_DEVICEINTERFACE { DWORD dbcc_size; DWORD...
2
by: 97612 | last post by:
Below are my codes,and I want to use TCHAR to replace the char /**************************************** const char* ptr = NULL; char newPath; ptr = strrchr(absPath, '.'); strncpy(newPath,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.