C++常用的函数指针 语法:返回值类型 (*函数名)(参数列表); 举例说明:int (*Func)(int m, int n); 用typedef简化函数指针的定义 例如: 函数指针的初始化和赋值 指针函数可以作为形参 有两种方式: 返回指向函数的指针 例如: 这句话的意思是:ff(int)是一个 ...
分类:
编程语言 时间:
2017-08-31 12:54:33
阅读次数:
176
package socket; import java.io.BufferedInputStream;import java.io.BufferedReader;import java.io.DataInputStream;import java.io.DataOutputStream;import ...
分类:
其他好文 时间:
2017-08-31 11:02:46
阅读次数:
192
#include #include using namespace std; //str1 是不是 str2的子串,若是,返回第一个子串开始的位置,若不是返回NULL bool zichuan1(string s1,string s2) { int pos=s1.find(s2); if(pos>s... ...
分类:
其他好文 时间:
2017-08-30 20:46:53
阅读次数:
362
一、获取当前文件的路径 string str1=Process.GetCurrentProcess().MainModule.FileName;//可获得当前执行的exe的文件名。 string str2=Environment.CurrentDirectory;//获取和设置当前目录(即该进程从中 ...
转自:http://www.cnblogs.com/netlyf/archive/2011/06/22/2086718.html 一、获取当前文件的路径 string str1=Process.GetCurrentProcess().MainModule.FileName;//可获得当前执行的exe ...
Difficulty:Medium Total Accepted:129.6K Total Submissions:667.5K Contributor:LeetCode 1 class Solution { 2 public: 3 bool cmpwrd(string str1, string s ...
分类:
其他好文 时间:
2017-08-26 02:44:41
阅读次数:
303
原文地址:http://blog.csdn.net/q394895302/article/details/50604929 ...
分类:
编程语言 时间:
2017-08-25 19:21:28
阅读次数:
114
一、运算符 关系运算符 条件运算符 逻辑运算符 二、分支结构 if else switch 满足case条件:有break则会跳出循环,无break则继续执行后续的不满足case条件的。 三、循环结构 for break 跳出循环 ...
分类:
编程语言 时间:
2017-08-24 00:14:48
阅读次数:
212
一、截取子串 二、复制字符串 三、追加字符串 四、翻转字符串 五、查找字符串 六、分割数据 七、连接数据(一般是列表或元祖) ...
分类:
编程语言 时间:
2017-08-23 17:37:00
阅读次数:
144
str1 和 str2 求str1 的子串 中含有str2 的所有字符的最小字串长度 例如: str1 ="abcde" str2="ac" 返回3 本题适合用还款方法 str1 去还 str2 里面的元素 ...
分类:
其他好文 时间:
2017-08-22 23:10:48
阅读次数:
168