- 博客(4)
- 资源 (1)
- 收藏
- 关注
转载 strtok、strtok_s、strtok_r 字符串分割函数
此文章转载自:https://blog.csdn.net/hustfoxy/article/details/23473805/1、strtok函数函数原型:char * strtok (char *str, const char * delimiters);参数:str,待分割的字符串(c-string);delimiters,分割符字符串。该函数用来将字符串分割成一个个片段。参数str指向欲分割...
2018-05-07 22:07:48 256
转载 C++常见问题: 字符串分割函数 split
此文章转载自:https://www.cnblogs.com/dfcao/p/cpp-FAQ-split.html C++标准库里面没有字符分割函数split ,这可太不方便了,我已经遇到>3次如何对字符串快速分割这个问题了。列几个常用方法以备不时之需。 方法一: 利用STL自己实现split 函数(常用,简单,直观)原型: vector<string> sp...
2018-05-07 21:32:54 424
原创 C语言printf函数输出表达式中的计算顺序
虽然printf()函数是从右往左计算表达式的,但输出时是从左往右输出的。示例:#include <stdio.h>int main(){ int i = 8, j = 8; printf("%d, %d, %d\n", i++, i++, i++); printf("%d\n\n", i); printf("%d, %d, %d\n", ++j, ++j, ++j);...
2018-05-06 16:24:25 3619 1
原创 求多个数的最小公倍数——C++实现
穷举法:#include <iostream>#include <vector>using namespace std;int commonMultipleOfTwoNumber(int a, int b){ int result = a; if (a == 0 || b == 0) throw new exception("error"); whil...
2018-05-01 16:40:37 8005 2
用Qt编写的具有人机对战的五子棋
2017-12-02
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人