当前位置:网站首页>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;
}边栏推荐
- Setup and upload of arduino-esp32 flash file plug-in program
- CodeBlocks MinGW installation configuration problem
- Online JSON to plaintext tool
- Embedded development: seven techniques for estimating battery life
- Go language learning notes - Gorm usage - database configuration, table addition | web framework gin (VII)
- 基于SSM实现水果蔬菜商城管理系统
- From jsonpath and XPath to spl
- PHP根据年月获取月初月末时间
- align-items 与 align-content 的区别
- Centos7——安装mysql5.7
猜你喜欢

Mobile web training day-1

MySQL multi table joint query

一文搞懂leveldb写操作

嵌入式开发:估算电池寿命的7个技巧
![BUUCTF:[WUSTCTF2020]朴实无华](/img/0f/a7973d3f7593f2464e48609e27d7bd.png)
BUUCTF:[WUSTCTF2020]朴实无华

Google Earth engine (GEE) - Global organic soil area of FAO (1992-2018)

1015.摘花生

scratch旅行相册 电子学会图形化编程scratch等级考试一级真题和答案解析2022年6月

Copying open source for basic software is not advisable. Self reliance is the right way

Successful cases of rights protection of open source projects: successful rights protection of SPuG open source operation and maintenance platform
随机推荐
Digital twin energy system, creating a "perspective" in the low-carbon era
You must configure either the server or JDBC driver (via the ‘serverTimezone‘ configuration property
5A synchronous rectifier chip 20V to 12v2a/5v4.5a high current 24W high power synchronous rectifier chip high current step-down IC fs2462
Matlab plotyy coordinate axis setting, [reprint] example of MATLAB plotyy drawing double ordinate graph [easy to understand]
投资98万美元的Saas项目失败了
K3s one click installation script
无心剑英译朱熹《观书有感二首·其一》
List集合转数组
Embedded development: seven techniques for estimating battery life
ShareIt has outstanding strength and landed in the top 7 of the global IAP strength list
How to solve the data inconsistency between redis and MySQL?
认识启动函数,找到用户入口
泛海微FH511单片机IC方案小家电LED照明MCU丝印FH511
Mobile web training day-1
How to handle the safest account opening when downloading the mobile app of Huatai Securities
Which company has a low rate for opening a securities account? How to open an account is the safest
Scratch travel photo album Electronic Society graphical programming scratch grade examination level 1 true questions and answers analysis June 2022
Mobile web training -flex layout test question 1
SHAREit實力出眾,登陸全球 IAP 實力榜 Top7
中二青年付杰的逆袭故事:从二本生到 ICLR 杰出论文奖,我用了20年