conversion from char to int- strchr

Hello!
Please, what is wrong with the conversion here?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include<iostream>
#include<string.h>
using namespace std;

int main(){

char word[40]="akva";
int dol=strlen(word);
cout <<dol;

int a=strchr(word, (int)'a');
cout<<a;
return 0;
}


Many thanks!
Topic archived. No new replies allowed.