本文介绍了C编程基本存在疑虑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好我最近看到的结构语法令人困惑。有结构功能吗?下面提到的C程序具有函数存储类型作为结构,它不是由终止; 。有人可以解释我或指导我这个
struct resource * platform_get_resource( struct platform_device * dev,
unsigned int 类型,unsigned int num)
{
int i;
for (i = 0 ; i < dev-> num_resources; i ++){
struct 资源* r =& dev-> resource [i ]。
if (type == resource_type(r)&& num-- == 0 )
return r;
}
return NULL;
}
解决方案
Hello i recently saw a structure syntax which was confusing . Is there any structural functions? The below mentioned C program has functions storage type as structure and it is not terminated by ; . Can someone explain me or guide me to a nice tutorial on this
struct resource *platform_get_resource(struct platform_device *dev, unsigned int type, unsigned int num) { int i; for (i = 0; i < dev->num_resources; i++) { struct resource *r = &dev->resource[i]; if (type == resource_type(r) && num-- == 0) return r; } return NULL; }
解决方案
这篇关于C编程基本存在疑虑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!