
C/C++
文章平均质量分 58
myflyinsky
速度与激情
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
派生类构造函数中调用基类虚函数,能够发生多态?-(否)
#include<iostream> using namespace std; class A{ public: A(int a) :a(a) { cout << "constructor A :" << a << endl; test1(); test2(); } ...原创 2018-02-27 11:38:00 · 1164 阅读 · 0 评论 -
Linux C通过socket获取网络设备ip地址的方法
#include <stdio.h> #include <string.h> #include <sys/socket.h> #include <arpa/inet.h> #include <net/if.h> int get_ip(const char *ifname, char *ip) { int sock_get_ip;...原创 2018-04-16 16:14:50 · 5092 阅读 · 5 评论 -
通用Makefile文件的编写
BIN := ./bin SRC := ./src INC := ./include OBJ := ./objs ALL_SOURCES := $(wildcard $(SRC/*.c) ALL_OBJECTS := $(patsubst %.c,%.o,$(notdir $(ALL_SOURCES))) OBJECTS := $(foreach file,$(ALL_OBJECTS)...原创 2018-04-16 16:22:05 · 263 阅读 · 0 评论