[英]Using boost for numeric ranges
我有這個簡單的代碼:
for (auto const& i : boost::counting_range(1, 5)) {
CString strSlipsPerPage;
strSlipsPerPage.Format(IDS_TPL_SLIPS_PER_PAGE, i);
m_cbStatusBarSlipsPerPage.AddString(strSlipsPerPage);
}
有沒有辦法指定范圍最多並包括最終數字? 除了將它增加到比您想要的多一個嗎?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.