#include <stdio.h>
const char* func1()
{
return __func__//这语句类似return (char *)"func1"
}
void func2()
{
printf("call function %s\n", __func__)
}
int
main(void)
{
printf("function name %s\n", func1())
func2()
return(0)
}
运行结谨拦果:
function name func1
call function func2
函数名: findfirst(); findnext ();功 能: 搜索磁盘目录取得下一扰山个匹配的findfirst模式的文件 ;
用宴塌 法:
int findfirst(char *pathname, struct ffblk *ffblk, int attrib)
int findnext(struct ffblk *ffblk)
举晌李圆例:
/* findnext example */
#include <stdio.h>
#include <dir.h>
int main(void)
{
struct ffblk ffblk
int done
printf("Directory listing of *.*\n")
done = findfirst("*.*",&ffblk,0)
while (!done)
{
printf(" %s\n", ffblk.ff_name)
done = findnext(&ffblk)
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)