If you want to use char arrays, you can write your own find function which loops through the array & returns the position of the found char. Do this for both search chars then subtract.
If you use a C++ string, you can use the find algorithm to do the same thing.
char code [10] ;
cout << "Enter a word with @ first some words then # in it:";
cin.getline(code,10);
/*kind@oftwo#la*/
//Make sure there are atleast two characters between @ and #
//Find position of @
for (int i = 0; i < 10; i ++)
{
string[i] = @;
}
//Find position of #
for (int j = 0; j < 10; j ++)
{
string[j] = #;
}
int place;
place = string[j] - string[i]; // to find how much characters
This doesn't work though..hmmm