By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,413 Members | 1,017 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,413 IT Pros & Developers. It's quick & easy.

Creating and writing to Unicode file

P: n/a
Hello-
I can't figure out how to create and write to a Unicode file using
C++ in Visual Studio 6.0. I need to do this for windows only. Could
someonw please help!???

thanks-
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I don't know if this answers your question, but here goes.

The Windows functions which take a string argument come in two flavors,
i.e., with 'A' appended to its name, or with 'W' appended. These are for
Ascii (char) strings or for Wide (wchar_t) strings. For example, there is
CreateFileA() and CreateFileW(). You can see these in your Windows SDK
header files. The unadorned names, e.g., CreateFile() will be converted to
one of the two forms depending on whether UNICODE is defined or not during
compilation.

So if you want to use the unicode versions, make sure that UNICODE is
defined as a compiler constant. Otherwise you can excplicitly call the 'W'
functions.
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.