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

Posted on 2004-08-19
Last Modified: 2013-11-20
If i have this:

WCHAR image[20];

How do I know if "image" is empty (blank).???
Question by:DAE
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
LVL 13

Expert Comment

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

Accepted Solution

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

or course.

Author Comment

ID: 11839658
Thanks SteH.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

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

Expert Comment

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

Author Comment

ID: 11840045

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Pressing cancel button with C# UI Automation 3 92
Tab names are off by one 5 54
bigDiff challenge 17 135
Not needed 13 129
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

726 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