Is there any Code How to take Arabic Input from user in C++ ?
+1
A:
I'll try answer the C++ part. You cannot read arabic characters from console with cin
. However in <iostream>
there's a predeclared wcin
object that is of type wistream
- a wide-character input stream. And you should read an input not into string
but into wstring
.
e.g
#include <iostream>
#include <string>
int main()
{
std::wstring s;
std::wcin >> s;
}
This was the C++ part, however the question remains whether or not your OS allows wide characters in the console window. HTH
Armen Tsirunyan
2010-10-08 11:16:43
Amongst the target demographic, I'm confident all OS'es will allow it.
MSalters
2010-10-08 11:20:49
Hmmm Thanks for the Input i will try this :)..!!
PhpSeeker
2010-10-09 05:42:49