摘要: 一.副作用(side effect) 表达式有两种功能:每个表达式都产生一个值( value ),同时可能包含副作用( side effect )。副作用是指改变了某些变量的值。 如: 1:20 //这个表达式的值是20;它没有副作用,因为它没有改变任何变量的值。 2:x=5 // 这个表达式的值是 阅读全文
posted @ 2017-04-19 16:43 yzl050819 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 经常可以在一些讨论组里看到下面的提问:“谁知道下面C语句给n赋什么值?”m = 1; n = m+++m++;最近有位不相识的朋友发email给我,问为什么在某个C++系统里,下面表达式打印出两个4,而不是4和5:a = 4; cout << a++ << a;C++ 不是规定 << 操作左结合吗? 阅读全文
posted @ 2017-04-19 16:17 yzl050819 阅读(1087) 评论(0) 推荐(0) 编辑
摘要: http://www.runoob.com/regexp/regexp-tutorial.html 阅读全文
posted @ 2017-04-19 13:14 yzl050819 阅读(137) 评论(0) 推荐(0) 编辑
摘要: qt的三种验证类: 1。输入int类型 QValidator *validator=new QIntValidator(100,999,this); QLineEdit *edit=new QLineEdit(this); edit->setValidator(validator); 也可以表示成 阅读全文
posted @ 2017-04-19 09:31 yzl050819 阅读(8247) 评论(0) 推荐(0) 编辑