I have the following problem
#include <iostream>
#include <stdio.h>
#include <string.h>
int main (){
string data = "\xd7\x91\xd7\x90" ;
data << data<<endl;
}
The output is: בא
But with an input.
#include <iostream>
#include <stdio.h>
#include <string.h>
int main (){
char rrr[100];
cout << "Please enter your string:" ;
scanf("%s",rrr);
cout<< rrr <<endl;
}
The input I type is: \xd7\x91\xd7\x90
The output I see on the screen is: \xd7\x91\xd7\x90
So my question is how can I convert the input \xd7\x91\xd7\x90 to בא?
You can change your scanf statement:
Still, it’s better to learn to stream in hex values ala: