Hello,
I must write a program that recognise scandinavian letters.
I wonder why this code does not work? (I use CLion 2018.)
1 2 3 4
|
for (char c: rad) {
if(c == 'å')
cout<<"Your text contains a " <<c<<'\n';
}
|
I used the ASCII table [url="
https://www.ascii-codes.com/cp865.html"]for scandinavian characters[/url] and tried:
[code]
for (unsigned char c: rad) {
if(c == 134)
cout<<"Your text contains a " <<c<<'\n';
}
[\code]
This does not work either. How can I solve it?
And how can I include all weird characters at once (once the initial problem is fixed)?
Could it be possible to write something like that?:
[code]
for (unsigned char c: rad) {
if(c >= 134 && c <= 165)
cout<<"Your text contains a " <<c<<'\n';
}
[\code]
Thank you.