当前位置:网站首页>Class structure in C language - dot
Class structure in C language - dot
2022-06-28 13:09:00 【AppNinja】
stay Visual Studio Tape to be compiled in " Order number " The structure of the body , Need to put main.cpp Change it to main.c, To compile through .
Example ,main.c
#include <stdio.h>
struct tagOPClass {
int a, b, c, d;
ssize_t(*read) (int input);
};
int myread(int input)
{
printf("myread input=%d\n", input + 1);
return input + 1;
}
int main()
{
struct tagOPClass opClass = {
.a = 1,
.c = 3, 4, //3,4 It's right .c and .d Assignment
.b = 5,
.read = myread
};
printf("opClass.a=%d ", opClass.a);
printf("opClass.b=%d ", opClass.b);
printf("opClass.c=%d ", opClass.c);
printf("opClass.d=%d \n", opClass.d);
printf("opClass.d=%d \n", opClass.read(97));
printf("%s Hello to you !\n", "demohello");
int i = 0;
/*
pid_t pid = 0;
if ((pid = fork()) > 0)
{
int n = 0;
while (true)
{
n = n - 1;
printf("fork=%d\n", n);
sleep(10);
// return 0;
}
//exit(0); // End subprocess
}
*/
while (0)
{
i = i + 2;
printf("value=%d\n", i);
}
//fork();
getchar();
return 0;
}边栏推荐
- go template with... End traversal usage
- manjaro easyconnecy报错:libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
- Deep understanding of Bayes theorem
- Complete backpack beginner chapter "suggestions collection"
- FH511+TP4333组成一个户外移动电源照明野营灯方案。
- 基于SSM实现水果蔬菜商城管理系统
- Centos7: switch MySQL users and log in to MySQL
- 4年用户数破亿,孙哥带领波场再创新高
- Successful cases of rights protection of open source projects: successful rights protection of SPuG open source operation and maintenance platform
- 高考失利进哈工大,毕业却留校要当“探索者”,丁效:科研就是厚积薄发
猜你喜欢

【历史上的今天】6 月 28 日:马斯克诞生;微软推出 Office 365;蔡氏电路的发明者出生

From jsonpath and XPath to spl
![[today in history] June 28: musk was born; Microsoft launches office 365; The inventor of Chua's circuit was born](/img/bf/09ccf36caec099098a22f0e8b670bd.png)
[today in history] June 28: musk was born; Microsoft launches office 365; The inventor of Chua's circuit was born

Embedded development: seven techniques for estimating battery life

Realization of a springboard machine

认识启动函数,找到用户入口

The $980000 SaaS project failed

腾讯汤道生:面向数实融合新世界,开发者是最重要的“建筑师”

Scratch travel photo album Electronic Society graphical programming scratch grade examination level 1 true questions and answers analysis June 2022

An idea plug-in that automatically generates unit tests, which improves the development efficiency by more than 70%!
随机推荐
Centos7——安装mysql5.7
5A同步整流芯片 20V转12V2A/5V4.5A大电流 24W大功率同步整流芯片 大电流降压IC FS2462
Mobile web training day-1
移动Web实训-flex布局测试题1
Microservice stability guarantee
ShareIt has outstanding strength and landed in the top 7 of the global IAP strength list
4年用户数破亿,孙哥带领波场再创新高
Which company has a low rate for opening a securities account? How to open an account is the safest
PHP根据年月获取月初月末时间
[MySQL from introduction to mastery] [advanced part] (III) creation of MySQL users_ Modification_ Delete and password settings
Fs7022 scheme series fs4059a dual two lithium battery series charging IC and protection IC
Matlab plotyy coordinate axis setting, [reprint] example of MATLAB plotyy drawing double ordinate graph [easy to understand]
How to display the server list of the electric donkey, and how to update the eMule server list
弹性盒子自动换行小Demo
PHP gets the number of digits and replaces it with the specified mantissa
List set to array
Centos7:切换mysql用户并登录mysql
The $980000 SaaS project failed
Tiantian mathematics serial 53: February 22
[today in history] June 28: musk was born; Microsoft launches office 365; The inventor of Chua's circuit was born