Dynadot โ€” .com Transfer

C++ Comparison

SpaceshipSpaceship
Watch

Lord

Established Member
Impact
13
Hey;

Say my variable string 'a' contained
"A b c d e f g h i j k l m n o p q r s t u v w x y z"

thats the string; spaces included.

I wonna see how many times a certain letter shows up; say 'j'

how would i compare the two strings(pretend they were both strings instead of letters) how would i compare the two strings and seperate each letter in string a into different "words" / figure out how to do this?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
There's a function strtok which can parse a string into tokens separated by spaces ot whatever you want. Or if you just waht to count/compare distinct letters, use char *ptr=your_string, and then ptr[0] is the first character in the string, ptr[1] the second and so on. Character '\0' marks the end of the string.
 
0
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
Appraise.net
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back