guys i have a problem i cant find a way to
count how many times a character occur in a character array
the out put should be
a=2
b=1
but my output is
a=2
b=1
a=0
i cant find away to get rid of the other a letter
i dont know what to do
#include <iostream>
using namespace std;
int main()
{
char array[3] = {'a','b','a'};
char frequency[26] ={'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'};
int forchar[3]={0};
int u=0;
for(int i=0; i<26; i++)
{