
C++
your_own_name
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
More Effective C++
1.指针和引用 引用必须赋初始值,没有空的,而指针可以为空 指针可以重新赋值,但引用总是指向最初的那个对象 当知道需要指向某个东西且不会指向其他东西时候,或者是实现操作符无法使用指针时候,选用引用,否则使用指针。#include <bits/stdc++.h>using namespace std;int main() { string s1("fsdfsaf");原创 2017-03-20 13:51:24 · 329 阅读 · 0 评论 -
ping程序的实现
ping 程序的实现#include <stdio.h>#include <sys/socket.h>#include <netdb.h>#include <unistd.h>#include <string.h>#include <arpa/inet.h>#include <netinet/ip_icmp.h>#include <sys/time.h>#include <signa原创 2017-07-13 18:11:18 · 466 阅读 · 0 评论 -
__sync_fetch_and_add的含义
type __sync_fetch_and_add (type *ptr, type value, ...)type __sync_fetch_and_sub (type *ptr, type value, ...)type __sync_fetch_and_or (type *ptr, type value, ...)type __sync_fetch_and_and (type *ptr,原创 2017-12-08 16:39:34 · 1116 阅读 · 0 评论