I have a print func like below:
void print(char **p)
{
cout<<p[0]<<endl;
}
Here is my main func
int _tmain(int argc, _TCHAR* argv[])
{
char a[50][50];
strcpy(a[0], "hello");
print(&a[0]);
}
The print func call will get compilation error. My question is without modifying the definition of the print func, how do I modify the print func call to make it print out hello?
Update: following code would work.
char *temp=a[0];
print(&temp);