Advertisement

10.30.2007 at 09:38AM PDT, ID: 22927432
[x]
Attachment Details

Command line parsing (UNICODE)

Asked by davidhq in Visual Studio, C++ Programming Language, Microsoft Visual C++.Net

Tags: , , ,

Hi!

I have this simple test program in Visual C++ (VS2005)

#include "stdafx.h"
#include <iostream>

using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
      for(int i = 0; i < argc; i++)
      {
            wcout << "|" << argv[i] << "|" << endl;
      }

      wcout << L"TEST: ¬aa~";

      return 0;
}

Character Set in project properties is set to: "Use Unicode Character Set".

When I start the program: "uni a b c", I get:

|uni|
|a|
|b|
|c|
TEST:

if I try "uni aa  ~~", I get just:
|uni|
|


So even this basic example is not working.. what am I doing wrong? thank you very muchStart Free Trial
[+][-]10.30.2007 at 09:40AM PDT, ID: 20178828

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.

 
[+][-]10.30.2007 at 11:11AM PDT, ID: 20179578

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.

 
[+][-]10.30.2007 at 11:18AM PDT, ID: 20179622

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

Zones: Visual Studio, C++ Programming Language, Microsoft Visual C++.Net
Tags: command, line, unicode, visual
Sign Up Now!
Solution Provided By: itsmeandnobodyelse
Participating Experts: 2
Solution Grade: A
 
 
[+][-]10.30.2007 at 11:20AM PDT, ID: 20179630

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.

 
[+][-]10.30.2007 at 11:38AM PDT, ID: 20179757

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.

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