Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
string in;
string alpha="abcdefghijklmnopqrstuvwxyz";
string mix="";
int sum[26];

for(int i=0;i<26;i++){
sum[i]=0;
}

while(){
in="";
cin>>in;
if(in=="")break;
mix=mix+in;
}

int a;
a=mix.length();

for(int i=0;i<a;i++){

if(mix[i]="a"){
sum[0]++;
}else if(mix[i]=b){
sum[1]++;
}else if(mix[i]=c){
sum[2]++;
}else if(mix[i]=d){
sum[3]++;
}else if(mix[i]=e){
sum[4]++;
}else if(mix[i]=f){
sum[5]++;
}else if(mix[i]=g){
sum[6]++;
}else if(mix[i]=h){
sum[7]++;
}else if(mix[i]=i){
sum[8]++;
}else if(mix[i]=j){
sum[9]++;
}else if(mix[i]=k){
sum[10]++;
}else if(mix[i]=l){
sum[11]++;
}else if(mix[i]=m){
sum[12]++;
}else if(mix[i]=n){
sum[13]++;
}else if(mix[i]=o){
sum[14]++;
}else if(mix[i]=p){
sum[15]++;
}else if(mix[i]=q){
sum[16]++;
}else if(mix[i]=r){
sum[17]++;
}else if(mix[i]=s){
sum[18]++;
}else if(mix[i]=t){
sum[19]++;
}else if(mix[i]=u){
sum[20]++;
}else if(mix[i]=v){
sum[21]++;
}else if(mix[i]=w){
sum[22]++;
}else if(mix[i]=x){
sum[23]++;
}else if(mix[i]=y){
sum[24]++;
}else if(mix[i]=z){
sum[25]++;
}


}

for(int i=0;i<26;i++){
cout<<" "<<alpha[i]<<": "<<sum[i]<<endl;
}
}




Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: expected primary-expression before ')' token
   14 | while(){
      |       ^
a.cc:26:11: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   26 | if(mix[i]="a"){
      |           ^~~
      |           |
      |           const char*
a.cc:28:17: error: 'b' was not declared in this scope
   28 | }else if(mix[i]=b){
      |                 ^
a.cc:30:17: error: 'c' was not declared in this scope
   30 | }else if(mix[i]=c){
      |                 ^
a.cc:32:17: error: 'd' was not declared in this scope
   32 | }else if(mix[i]=d){
      |                 ^
a.cc:34:17: error: 'e' was not declared in this scope
   34 | }else if(mix[i]=e){
      |                 ^
a.cc:36:17: error: 'f' was not declared in this scope
   36 | }else if(mix[i]=f){
      |                 ^
a.cc:38:17: error: 'g' was not declared in this scope
   38 | }else if(mix[i]=g){
      |                 ^
a.cc:40:17: error: 'h' was not declared in this scope
   40 | }else if(mix[i]=h){
      |                 ^
a.cc:44:17: error: 'j' was not declared in this scope
   44 | }else if(mix[i]=j){
      |                 ^
a.cc:46:17: error: 'k' was not declared in this scope
   46 | }else if(mix[i]=k){
      |                 ^
a.cc:48:17: error: 'l' was not declared in this scope
   48 | }else if(mix[i]=l){
      |                 ^
a.cc:50:17: error: 'm' was not declared in this scope
   50 | }else if(mix[i]=m){
      |                 ^
a.cc:52:17: error: 'n' was not declared in this scope
   52 | }else if(mix[i]=n){
      |                 ^
a.cc:54:17: error: 'o' was not declared in this scope
   54 | }else if(mix[i]=o){
      |                 ^
a.cc:56:17: error: 'p' was not declared in this scope
   56 | }else if(mix[i]=p){
      |                 ^
a.cc:58:17: error: 'q' was not declared in this scope
   58 | }else if(mix[i]=q){
      |                 ^
a.cc:60:17: error: 'r' was not declared in this scope
   60 | }else if(mix[i]=r){
      |                 ^
a.cc:62:17: error: 's' was not declared in this scope
   62 | }else if(mix[i]=s){
      |                 ^
a.cc:64:17: error: 't' was not declared in this scope
   64 | }else if(mix[i]=t){
      |                 ^
a.cc:66:17: error: 'u' was not declared in this scope
   66 | }else if(mix[i]=u){
      |                 ^
a.cc:68:17: error: 'v' was not declared in this scope
   68 | }else if(mix[i]=v){
      |                 ^
a.cc:70:17: error: 'w' was not declared in this scope
   70 | }else if(mix[i]=w){
      |                 ^
a.cc:72:17: error: 'x' was not declared in this scope
   72 | }else if(mix[i]=x){
      |                 ^
a.cc:74:17: error: 'y' was not declared in this scope
   74 | }else if(mix[i]=y){
      |                 ^
a.cc:76:17: error: 'z' was not declared in this scope
   76 | }else if(mix[i]=z){
      |                 ^