- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 c++ string 没有 split
但愿这篇笔记能在不久后变成陈旧的,C++ 标准库 扩充上了splitC++标准库的string没有split方法,在java和C#中有的。虽然标准库的string的方法:使用find_first_of、substr、循环也能实现split,但是有很多更简单的办法:1、借助CC++是兼容C的,能使用C语言的库函数。标准库没有split,但 中却有个 strtok 。
2015-01-23 22:34:29 2356
转载 memcpy memmove 的区别
memcpy naive的内存复制,源内存块和目的内存块不能重叠,重叠的话不能保证执行后 目的内存块的值是原来源内存块的值。memmove 源内存块和目的内存块允许重叠,就好像使用了一个中间缓冲区作为中转一样,但完全不用中间缓冲区就能实现,其实。具体的实现代码可以参考,这个。还有 它 也解释了它们的区别。
2015-01-23 10:50:47 624
原创 Visual Studio 2013 error LNK1104: cannot open file 'kernel32.lib'
Just add : VC++ Directories -> Library Directories -> $(WindowsSDK_LibraryPath_x86) (for win32 project)or $(WindowsSDK_LibraryPath_x64) (x64 project)
2015-01-16 11:30:53 4838
原创 求最大公约数,一个逐步消除递归的例子。
算法 stein www.cnblogs.com/drizzlecrj/archive/2007/09/14/892340.htmlint gcd (int a, int b) // a,b>=0{ if(a==0) return b; if(b==0) return a; if( ((a&1)==0) && ((b&1)==0) ) { return gcd(a>>1,b
2015-01-15 21:46:17 670
转载 Debugging information cannot be found or does not match
https://social.msdn.microsoft.com/Forums/en-US/503d3ded-976e-460e-b5f9-7e03454ed387/debugging-information-cannot-be-found-or-does-not-match?forum=Vsexpressvca "hello,world" c++ program built by vi
2015-01-15 19:17:36 708
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人