摘要:
自己总结的在android中常会出现的不好解决的问题和方法(其中第三个方法经过了四天的折磨。。。。。哎)1.报错:BUILD FAILEDD:\workspace\ganji\build.xml:144: The following error occurred while executing this line:D:\workspace\ganji\build.xml:271: Unable to delete file D:\workspace\ganji\tmp\proguard\tmp.jar解决:已经开了一个模拟器了,无法重新编译,必须关闭一个。用于ant2.报错:The conne
阅读全文
posted @ 2014-03-03 19:25
汉寿亭侯
阅读(247)
推荐(0)
编辑
摘要:
在cocos2d-x中,有一个格式刷:CCString(数据转换常常找她做中间人)那么我们要转换类型,可先将起始数据类型刷成CCString然后再转成目的数据类型,这个方法比较方便且实用。int 转 CCstringint num=5;CCString* ns=CCString::createWithFormat("%d",num);CCstring转intintpx = ns->intValue();//将CCString 转换为int的方法,转成float类型有 floatValue()======================================C
阅读全文
posted @ 2014-03-03 16:19
汉寿亭侯
阅读(707)
推荐(0)
编辑
摘要:
实现字符串任意分割,如下程序,并有使用举例。#include #include #include #include using namespace std;typedef basic_string::size_type S_T;static const S_T npos = -1;////trim指示是否保留空串,默认为保留。tok可以为任意多个字符vector tokenize(const string& src, string tok, bool trim=false, string null_subst=""){ if( src.empty() || tok.
阅读全文
posted @ 2014-03-03 10:10
汉寿亭侯
阅读(599)
推荐(0)
编辑