0

Currently my project does not support UNICODE. I want to make it to convert all the char to wchar_t.

My project has the mix of both char and wchar_t.

Basically one class I needed now to modify its arguments which is leading to more changes. Kindly help how to make it will less changes.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490

1 Answers1

0

You can Implement a Macro or inline function in a file which is common to whole project. Macros should generally be avoided; prefer inline functions to them at all times, an inline function will respect namespaces and other scopes, as well as evaluating all the arguments once.

But for Macro Programming here is snippet

#define MACRO(X,Y) \
 ( \
  (cout << "1st arg is:" << (X) << endl), \
  (cout << "2nd arg is:" << (Y) << endl), \
  (cout << "3rd arg is:" << ((X) + (Y)) << endl), \
  (void)0 \
 )

For conversion logic refer

How to convert char* to wchar_t*?

Community
  • 1
  • 1
DNamto
  • 1,342
  • 1
  • 21
  • 42