![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C-C++
文章平均质量分 69
shiwenqiang
这个作者很懒,什么都没留下…
展开
-
从const int *, int const *, int * const 及const int * const到指针常量、常量指针
问题来由 在C\C++里的有一个老生常谈的问题:关于const限定符与指针符号 * 之间位置关系的不同组合,在代码中所代表的语义的差异。在理解这些不同概念时,发现有两个对应的中文翻译:指针常量和常量指针,大家的理解居然不一致,甚至是刚好相反。有意思的是,到现在为止,从网上的博客文章、搜索词条,好像也没有因为这种理解上的差异,生出额外的沟通、代码成本,大家各自用的都还挺顺,实在“诡异”。今...原创 2017-08-23 00:58:09 · 639 阅读 · 0 评论 -
Linux/Unix socket 基础API (一)
socket标准API 1. 创建socket 函数原型: #include <sys/types.h> #include <sys/socket.h> int socket(int domain, int type, int protocol); 函数说明: 参数说明: domain 表示使用哪个底层协议族 ,原创 2018-05-20 23:55:53 · 723 阅读 · 0 评论 -
进程及POSIX线程优先级杂谈(一)
本系列主要描述网络编程中使用到的基础API,按照基础接口、特殊配置接口、网络信息接口等进行编排整理。已发表的博文也将保持不定期更新优化,力求精简准确。 socket特殊配置接口 socket选项 函数原型 #include <sys/socket.h> int getsockopt(int sockfd, int level, int option_na...原创 2018-06-25 01:06:35 · 795 阅读 · 0 评论