Hello Everyone , I am writing a code in which i search a char array and look at what is missing in the array i mean what letters are missing in the array.
I worked out a small code but i seem to have some error in the answer though it compiles fine.
This is not a homework assignment. But a small project i am working on which needs something same like this.
Here is my code.
#include <iostream>
using namespace std;
int main()
{
char one[10];
char two[]={'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 s;
cout<<" Enter one word:: \n";
cin>> one;
for (int a=0;a<=strlen(one);a++)
{
for (int b=0;b<=25;b++)
{
if (one[a]!=two[b]){ s=a;}
else{
break;
}
}
cout<< two[s];
}
cin.get();
cin.get();
}