RE: size_t ?
- From: "Robby" <Robby@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 17 Sep 2005 13:01:04 -0700
Thanks David !
--
Best regards
Robert
"Robby" wrote:
> Hi,
>
> As you may know from other numerous questions that I have recently posted, I
> am trying to begin Windows programming, and I felt the need to go back a few
> chapters and once and for all understand character types in Windows.
>
> I have been reading up on UNICODE, hence normal characters and wide characters
> and personally, I think Windows got complicated, but probably had no choice
> given that computers started of with an 8 bit ascii bytes.... But one thing
> is for sure, is that I find myself reading complex documentation that refers
> to excuse the expression, "under the window's hood information", causing me
> to read it several times to try and make sence of it.
>
> Sure I can just skip it and just take it for granted that a char type is
> just a char type and the hell with where TCHAR comes from. But I just can't
> do that.
>
> I have appreciated all your help guys....
>
> OKAY, My question....
>
> I have read that:
>
> wchar * pc = "Hello";
> iLenght = strlen(pc);
>
> is a pointer to a chartacter string, where iLenght will get the lenght of
> the string stored at the location of pc. And that if I do this:
>
> wchar * pw = L"Hello";
> iLenght = strlen(pw);
>
> we will get a warning stating that the strlen function accepts a pointer to
> a character but is getting a pointer to an unsigned short. So we must use:
>
> iLenght = wcslen (pw)
>
> instead.
>
> It has been written that wcslen is the wide character version of the strlen
> and declared in STRING.H and WCHAR.H.
>
> Here is the start of my gray zone:
>
> -Why declared in 2 locations?
> -Can I view this, to satisfy my curiosity (I typed out both files in a
> search and I did not find the following declarations)?:
>
> size_t __cdecl strlen (const char *)
> size_t __cdecl wcslen (const wchar_t *)
>
> -Is size_t an integer type, and where is it declared in the windows header
> files
> and how is it declared?
> -And what does the __cdecl mean?
>
> To experienced programmers, these are surely no brainers, to myself its what
> I would fully love to explore!
>
> All information appreciated!
>
> --
> Best regards
> Robert
.
- References:
- size_t ?
- From: Robby
- size_t ?
- Prev by Date: Re: size_t ?
- Next by Date: Re: size_t ?
- Previous by thread: Re: size_t ?
- Next by thread: Re: size_t ?
- Index(es):
Relevant Pages
|