|
-
Jul 26th, 2001, 01:08 AM
#1
Thread Starter
PowerPoster
copy Ctrl Z
I have a simple question... If I want to copy the Ctrl-Z (^Z) or ASCII 26 into a wchar_t buffer. How much size that I should allocate for the buffer? 1, 2, or 4 bytes?
PHP Code:
wchar_t CZ[1];
memset(CZ,0,1);
CZ[0] = 26;
regards,
-
Jul 26th, 2001, 11:09 AM
#2
Monday Morning Lunatic
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jul 26th, 2001, 11:13 AM
#3
Thread Starter
PowerPoster
hi! parksie, do you mean i should declare with size = 2? I sis try with size 1. ie
wchar_t CZ[1];
and it work too why? I know 1 byte of char = 2byte of wchar_t. Am i right?
-
Jul 26th, 2001, 11:17 AM
#4
Monday Morning Lunatic
wchar_t CZ[1] is a bizarre thing to write because you might as well use wchar_t CZ. One wchar_t is 2 bytes, but one char is 1 byte.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|