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

How can i use Itow() or wtoi() functions in Sun Solaris Sparc?

P: n/a
Hi
How can i use Itow(),_itow(),wtoi() or _wtoi() functions in Sun Solaris
Sparc?
Can you suggest standard way of doing it on Sun Solaris Sparc? We are
using gcc 3.4.2 .
Thanks
Vinu

Jul 23 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a

Jul 23 '05 #2

P: n/a


Vinu schreef:
Hi
How can i use Itow(),_itow(),wtoi() or _wtoi() functions in Sun Solaris
Sparc?


Don't. The _ prefix is there to warn you you're using non-standard
stuff. The Standard C++ way is <sstream>

HTH,
Michiel Salters

Jul 23 '05 #3

P: n/a
Hello

Then what is the way to convert int to a wide character Can you suggest
standard way of doing it.

Thanks
Vinu

Jul 23 '05 #4

P: n/a
It has already been mentioned, use <sstream>

#include <iostream>
#include <string>
#include <sstream>
#include <cwchar>

using namespace std;

int main (int argc, char * const argv[]) {
wstringstream s;
int x;
wcout<< "Enter an integer : ";
wcin >> x;

s << "Value entered is : " << x;
wcout<<s.str();

return 0;
}
HTH,
Philip

Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.