-1

I am a beginner; I want to make an array to count number of repetition of each character on c++. for Example: the input array>> [aaa bb cccc] the out put array>>[3 2 4]

1 Answers1

0

There is a great exemple at Count character occurrences in a string , you just need to initialize an array with the characters that you want to count and then launch a for function

Community
  • 1
  • 1
JeanMGirard
  • 171
  • 2
  • 7