我在cocos2d-x中要读取一个文件文件的内容大致如下:
/* No comment provided by engineer. */
" for four minutes. Enjoy" = ", 希望您喜欢";/* No comment provided by engineer. */
" is stocking products in " = "正在备货到";
我要提取引号内的内容,比如第二行的“for four minutes. Enjoy”和“ 希望您喜欢”,以及第四行的" is stocking products in "和"正在备货到"。
如果我要用ifstream和getline来做,应该怎么用ifstream和getline?怎样提取有用字符串?
/* No comment provided by engineer. */
" for four minutes. Enjoy" = ", 希望您喜欢";/* No comment provided by engineer. */
" is stocking products in " = "正在备货到";
我要提取引号内的内容,比如第二行的“for four minutes. Enjoy”和“ 希望您喜欢”,以及第四行的" is stocking products in "和"正在备货到"。
如果我要用ifstream和getline来做,应该怎么用ifstream和getline?怎样提取有用字符串?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货