QString s = "2.3"; int n; n = s.toInt(); cout << n <<endl;. 結果: 0 結論:. 在linux Qt下不能將帶小數的字串直接轉為int型,只能按相應格式轉化 ...
確定! 回上一頁