質問するログイン新規登録

回答編集履歴

1

内容追記

2019/02/05 06:35

投稿

kazto
kazto

スコア7196

answer CHANGED
@@ -5,7 +5,10 @@
5
5
  ですので、以下のようにドットを使うのが正しいかと思います。
6
6
 
7
7
  ```C++
8
+ vector<Hogehoge> _new_list;
8
9
  for (auto itr : _data_list)
9
10
  { // 初期の数値を読み込む
11
+ Hogehoge new_item(itr); // ←要コピーコンストラクタ
10
- itr.value = GetPrivateProfileInt(itr.section.c_str(), itr.key.c_str(), itr.value, itr.path.c_str());
12
+ new_item.value = GetPrivateProfileInt(itr.section.c_str(), itr.key.c_str(), itr.value, itr.path.c_str());
13
+ _new_list.push_back(new_item);
11
14
  ```