how to call a function from main func?

hey. i have a function in a struct and i want to call it from main function

Here is the a part of my code:

1
2
3
4
struct X{

int search(char *);
};


and in the main func:

1
2
3
X test;
char ch='a';
test.search(ch);//ERROR LINE 


and here is the error msg: error: invalid conversion from 'char' to 'char*'|
Change char ch='a'; to char* ch = "a";
thanks...
Topic archived. No new replies allowed.