Solved

How to know if a WCHAR[20] is empty???

Posted on 2004-08-19
6
1,256 Views
Last Modified: 2013-11-20
If i have this:

WCHAR image[20];

How do I know if "image" is empty (blank).???
0
Comment
Question by:DAE
  • 3
  • 3
6 Comments
 
LVL 13

Expert Comment

by:SteH
ID: 11839630
if (0 == wcslen)
   // it is empty
0
 
LVL 13

Accepted Solution

by:
SteH earned 50 total points
ID: 11839632
Sorry it should be
if (0 == wcslen (image))
   /// ...

or course.
0
 

Author Comment

by:DAE
ID: 11839658
Thanks SteH.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

Author Comment

by:DAE
ID: 11839760
And what is the correct way to make empty a WCHAR[x] var?
0
 
LVL 13

Expert Comment

by:SteH
ID: 11840002
wcscpy (image, L""); // or _T("")
0
 

Author Comment

by:DAE
ID: 11840045
THX
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Whole sheet autoscrub still needed 19 51
Expand to include initial dialog with two choices. 9 80
sum67 challenge 35 107
Work with App store 7 67
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question