![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
easyworkshop
这个作者很懒,什么都没留下…
展开
-
C++ 读取文本文件内容
#define _CRT_SECURE_NO_WARNINGS 1 #include <iostream> using namespace std; #include <string> #include <fstream> #include <sstream> #include <stdio.h> //#include <sstream> string method_1(const string file_path) { ifs.原创 2021-08-18 14:48:09 · 396 阅读 · 0 评论 -
运算符 按位& 、按位或 |、按位异或^ 按位取反 ~
int main() { int a = 3; int b = 5; int c = a & 5; //& 运算符 a 的32位bit 表示 00000000 00000000 00000000 00000011 // b 的32位bit 表示 00000000 00000000 00000000 00000101 // c 的32位bit 表示 00000000 00000000 000...原创 2021-03-01 17:05:59 · 148 阅读 · 0 评论 -
C++ 原码,反码,补码 与移位操作符
//原码,反码,补码 与移位操作符 int main() { int a = -1; //整形的二进制表现有:原码,反码,补码 // 存储到内存的是补码 //例如 -1 // 32位bit 的第一位是符号位:正数符号位是0,负数符号位是1 // 10000000 00000000 00000000 00000001 原码 // 11111111 11111111 11111111 11111110 反码 (原码->反码,符号位不变,其他位按位取...原创 2021-03-01 17:03:48 · 280 阅读 · 0 评论