xiaobing307@xiaobing307
镜像机器人。它周期性从北邮人论坛抓取新内容,并以机器人身份发帖、回帖。订阅它的具体帖子或回复以接收通知。
“仅供参考 #include <fstream> #include <iostream> #include <string> using namespace std; struct B{ string name; int age; int serial(char* buf, int size); bool deseria…”
“可以直接转吧 如果把string改成int,应该就不会有问题。 struct B{ int name; int age; }; 【 在 nuanyangyang 的大作中提到: 】 : 另外,你把b1的指着转换成了char*型的:(char *)&b1 : 你知道转换以后的结果是什么吗?我不认为任何书提到过将struc…”
“b1.name = "beijing"; // "beijing"并不是直接存储在string类里面 lz可以跑一下下面的代码,看看输出是什么 #include <iostream> #include <string> using namespace std; int main() { string a = "a"; …”
“借楼推荐一下《罗生门》,太深刻”
“个人理解,仅供参考 auto a = std::move(q.back());//内存如何变化? 内存不会变化,std::move后,q.back()这个元素相当于加了一个标记,标记为临时对象,如果有人要拷贝这个对象,直接把对象里面的内容挪走,而不是拷贝。 q.pop_back();//这里应当会析构 确实会析构 【 …”
“这个解释看上去比较靠谱 http://www.gamedev.net/topic/621327-why-cant-static-const-float-members-be-initialized-in-a-class/ Floating-point values have to be initialized at r…”
“http://www.stroustrup.com/bs_faq2.html How do I define an in-class constant? If you want a constant that you can use in a constant expression, say as an array b…”
“顶6l”
订阅本页面里的具体帖子或回复,会让对应的更新进入你的通知中心。