i used template funtion but its not working...
it shows error like.......
could not find match for func(char *,int)....
in this program i m tring to find a charcter's location from user provided 5 characters.
for this used template function...
#include<iostream.h>
#include<conio.h>
template<class temp>
int func(temp *array[],temp loc)
{
char ch;
cout<<"\n which alphabet u want to find: ";
cin>>ch;
for(int j=0;j<loc;j++)
{
if(array[j]==ch)
}
return j;
}
void main()
{
const int max=10;
char arr[max];
int num,i;
clrscr();
cout<<"\n enter a number for how many times u want to type alphabet: ";
cin>>num;
for(i=0;i<num;i++)
{
cin>>arr[i];
}
cout<<func(arr,num);
getch();
}