当前位置:网站首页>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;
}
边栏推荐
- align-items 与 align-content 的区别
- Centos7:切换mysql用户并登录mysql
- redis和mysql数据不一致问题如何解决?
- pytorch基础
- 腾讯汤道生:面向数实融合新世界,开发者是最重要的“建筑师”
- async-validator.js數據校驗器
- Deep understanding of Bayes theorem
- k3s一键安装脚本
- Stm32f1 and stm32cubeide programming example - matrix keyboard driver
- Manjaro easyconnecy error: libgtk-x11-2.0 so. 0: cannot open shared object file: No such file or directory
猜你喜欢
MySQL多表联合查询
Go语学习笔记 - gorm使用 - 数据库配置、表新增 | Web框架Gin(七)
flutter 系列之:flutter 中常用的 GridView layout 详解
An idea plug-in that automatically generates unit tests, which improves the development efficiency by more than 70%!
Embedded development: seven techniques for estimating battery life
5A同步整流芯片 20V转12V2A/5V4.5A大电流 24W大功率同步整流芯片 大电流降压IC FS2462
Tencent tangdaosheng: facing the new world of digital and real integration, developers are the most important "architects"
Stm32f1 and stm32cubeide programming example - matrix keyboard driver
manjaro easyconnecy报错:libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
Implementation of fruit and vegetable mall management system based on SSM
随机推荐
Watermaker of the Flink core
Centos7: switch MySQL users and log in to MySQL
php获取数字的个位数并替换为指定的尾数
数启扬帆,智聚人才 | 腾讯云数据库 & CSDN 工程师能力轻量认证发布会重磅来袭!...
股票网上开户及开户流程怎样?手机开户是安全么?
JS class 并不只是简单的语法糖!
codeblocks mingw安装配置问题
Performance test-01-introduction
MySQ 8.0 推出直方图,性能大大提升!
Vscode如何设置代码保存后自动格式化
移动Web实训-flex布局测试题1
基于SSM实现水果蔬菜商城管理系统
Deep understanding of Bayes theorem
pytorch模型
Setup and upload of arduino-esp32 flash file plug-in program
scratch旅行相册 电子学会图形化编程scratch等级考试一级真题和答案解析2022年6月
高考失利進哈工大,畢業卻留校要當“探索者”,丁效:科研就是厚積薄發
How to solve the data inconsistency between redis and MySQL?
PHP gets the number of digits and replaces it with the specified mantissa
Elastic box auto wrap demo