2017.12.23

初识C++:
1. 流(stream):随时间推移,字符顺序生成或消耗
2. manipulator操纵符 buffer缓冲区 initialize初始化
3. 名称空间namespace;using namespace std
4. c语言:传值;c++:传/引用/
5. streamstring:字符串流
6. ctor构造函数:声明变量时调用

struct Point {
    int x, y;
    Point(int x=0, y=0):x(x),y(y){}
};
struct Point {
    int x, y;
    Point(int x=0, y=0){ this->x =x; this->y =y;}
};//this指的是当前对象的指针

此时Point()相当于Point(0,0)。
7.模板(template)

template <typename T>
struct Point {
    T x,y;
    Point (T x=0, T y=0)x(x),y(y) {}
};
template <typename T>
Point<T> operator + (const Point<T> &A,const Point<T> &B){
    return Point<T>(A.x+B.x,A.y+B.y>;
}


/opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld: Dwarf Error: found dwarf version '5', this reader only handles version 2, 3 and 4 information. ./gpio/source/lib/libgpiod.a(libgpiod_la-core.o): In function `gpiod_chip_open': core.c:(.text+0x60): undefined reference to `__lstat64_time64' core.c:(.text+0x82): undefined reference to `__stat64_time64' /opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld: Dwarf Error: found dwarf version '256', this reader only handles version 2, 3 and 4 information. core.c:(.text+0x1c6): undefined reference to `__ioctl_time64' ./gpio/source/lib/libgpiod.a(libgpiod_la-core.o): In function `gpiod_line_update': core.c:(.text+0x2ea): undefined reference to `__ioctl_time64' ./gpio/source/lib/libgpiod.a(libgpiod_la-core.o): In function `line_request_values': core.c:(.text+0x504): undefined reference to `__ioctl_time64' /opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld: Dwarf Error: found dwarf version '5', this reader only handles version 2, 3 and 4 information. ./gpio/source/lib/libgpiod.a(libgpiod_la-core.o): In function `line_request_event_single': core.c:(.text+0x6e0): undefined reference to `__ioctl_time64' ./gpio/source/lib/libgpiod.a(libgpiod_la-core.o): In function `gpiod_line_get_value_bulk': core.c:(.text+0x942): undefined reference to `__ioctl_time64' /opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld: Dwarf Error: found dwarf version '55303', this reader only handles version 2, 3 and 4 information. ./gpio/source/lib/libgpiod.a(libgpiod_la-core.o):core.c:(.text+0x968): more undefined references to `__ioctl_time64' follow /opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld: Dwarf Error: found dwarf version '6656', this reader only handles version 2, 3 and 4 information. ./gpio/source/lib/libgpiod.a(libgpiod_la-core.o): In function `gpiod_line_event_wait_bulk': core.c:(.text+0xf30): undefined reference to `__ppoll64' /opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld: Dwarf Error: found dwarf version '5', this reader only handles version 2, 3 and 4 information. ./gpio/source/lib/libgpiod.a(libgpiod_la-helpers.o): In function `gpiod_chip_open_lookup': helpers.c:(.text+0x178): undefined reference to `__isoc23_strtoul' collect2: 错误: ld 返回 1 make: *** [Makefile:63:build/bin/demo] 错误 1
06-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值