Advertisement

03.14.2007 at 09:25AM PDT, ID: 22449180
[x]
Attachment Details

Initialisation of WCHAR array

Asked by mrwad99 in C++ Programming Language

Tags: array, wchar

Ah hello.

Quick question this one:  why is the result of the following statements different:

// When viewed in the memory window of VS, sBuffer is all '...', i.e. totally empty.  When hovered over,
// the tooltip states sBuffer=""
WCHAR sBuffer[10000] = _T("");

// When viewed in the memory window of VS, a is all 'ÌÌÌÌÌÌ', i.e. rubbish.  When hovered over, the tooltip
// states s="" (???)
WCHAR s[10000];
s[0]= _T('\0');

What is the first case doing that is so special?

TIA
Start Free Trial
 
 
[+][-]03.14.2007 at 10:26AM PDT, ID: 18720367

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.14.2007 at 12:20PM PDT, ID: 18721351

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.15.2007 at 02:41AM PDT, ID: 18725658

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.15.2007 at 05:25AM PDT, ID: 18726286

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.15.2007 at 09:15AM PDT, ID: 18728162

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.15.2007 at 10:32AM PDT, ID: 18728832

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.16.2007 at 03:10AM PDT, ID: 18733570

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.16.2007 at 05:23AM PDT, ID: 18734119

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: C++ Programming Language
Tags: array, wchar
Sign Up Now!
Solution Provided By: itsmeandnobodyelse
Participating Experts: 3
Solution Grade: A
 
 
[+][-]03.16.2007 at 08:57AM PDT, ID: 18735789

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32