是否有可能获得一个函数来返回一个int或一个char*取决于执行时发生的事情?我已经尝试了无效但在编译时我得到了很多警告
例
void int_char(char *str)
{
if (I 'm matching a condition in my string)
return (str);
else
return (0);
}
Run Code Online (Sandbox Code Playgroud)
我希望我足够清楚.PS:我是C编程的初学者
c ×1