+ 3

How do i check what characters there are in a string?

I have just finished the C++ tutorial and want to try myself a bit with the coding challenges or what you call them. I thought that i would start with the beginner challenges but after looking at multiple challenges i realize that i need to know how to chech what characters there are in a string, like for example in the ASCII converter one. I have no clue how i do. Plz help!

8th Feb 2019, 7:21 PM
Swegolf
4 Answers
+ 3
The SL course isn't that good maybe you should consider downloading c++ tutorial apps to learn enum,vector,delaying, conio.h etc.
9th Feb 2019, 9:46 AM
Shahil Ahmed
Shahil Ahmed - avatar
+ 2
Take smaller steps Try to separate characters of a string Try to compare the separate characters with a constant value (like "a") Try to compare the separate characters with a dynamic from another string
8th Feb 2019, 9:06 PM
sneeze
sneeze - avatar
+ 1
Chars are basically small ints that are read as letters (according to the ASCII table which you should google). But they are still numbers, so you can compare them: b is > than a, G is < than H. Play a bit around with it.
8th Feb 2019, 9:54 PM
HonFu
HonFu - avatar
+ 1
Ok. Thank you guys! Ill try it all out and try to learn and see what works best for me!
9th Feb 2019, 7:47 AM
Swegolf