摘要: ## 二维数组分配: ```cpp #include int main() { int rows = 3; int cols = 4; // 使用二级指针创建一个动态分配的二维数组 int **array = new int*[rows]; for (int i = 0; i #include in 阅读全文
posted @ 2023-06-01 17:19 hacker_dvd 阅读(23) 评论(0) 推荐(0)
摘要: 1.删除每一行的最后一个字符:`:%s/.$//` 2.删除指定行的最后一个字符:先选中待删除行,然后执行命令`:s/.$//` 阅读全文
posted @ 2023-06-01 17:13 hacker_dvd 阅读(547) 评论(0) 推荐(0)
摘要: #include <iostream> #include <fstream> #include <sstream> int main() { std::ifstream file("in.txt"); if (!file.is_open()) { std::cerr << "can't open f 阅读全文
posted @ 2023-06-01 16:12 hacker_dvd 阅读(26) 评论(0) 推荐(0)