HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: how to print wchar_t strings
Operating System - Linux
1826214
Members
3103
Online
109691
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 04:36 AM
05-26-2008 04:36 AM
how to print wchar_t strings
Hi
I need help in priting wchar_t strings
the output i get for the following program is some address
#include
int main()
{
wchar_t temp[]=L"Hello World";
cout< return 0;
}
any info/pointers as how to print
from
nayeem khan
I need help in priting wchar_t strings
the output i get for the following program is some address
#include
int main()
{
wchar_t temp[]=L"Hello World";
cout<
}
any info/pointers as how to print
from
nayeem khan
- Tags:
- wchar_t
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 04:59 AM
05-26-2008 04:59 AM
Re: how to print wchar_t strings
(These aren't the droids you're looking for. :-)
You shouldn't be using iostream. But instead use stdio.
The reason you get an address is because cout doesn't have a wchar_t insertion operator. You'll need to use wcout.
Then there are N other roadblocks that keeps this from working.
You may instead want to use wcstombs(3) to convert from wide character string to a multibyte string and then just use cout.
You shouldn't be using iostream. But instead use stdio.
The reason you get an address is because cout doesn't have a wchar_t insertion operator. You'll need to use wcout.
Then there are N other roadblocks that keeps this from working.
You may instead want to use wcstombs(3) to convert from wide character string to a multibyte string and then just use cout.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 05:03 AM
05-26-2008 05:03 AM
Re: how to print wchar_t strings
Hi Dennis
Thanks for the response...
Another easy way is to use wcout
If we use iostream we have to use wcout instead of cout
#include
int main()
{
wchar_t temp[]=L"Hello World";
wcout< return 0;
}
from
nayeem khan
Thanks for the response...
Another easy way is to use wcout
If we use iostream we have to use wcout instead of cout
#include
int main()
{
wchar_t temp[]=L"Hello World";
wcout<
}
from
nayeem khan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 05:13 AM
05-26-2008 05:13 AM
Re: how to print wchar_t strings
>If we use iostream we have to use wcout instead of cout
Yes but then you'll only be able to print out ASCII chars.
The N roadblocks are all documented here:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1054305
Yes but then you'll only be able to print out ASCII chars.
The N roadblocks are all documented here:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1054305
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP