anonymous No title
No License C++
2019年07月01日
Copy Clone
#include <iostream>
#include <vector>
#include <string>

int main (void){
  std::vector<std::string> VNames = {"hoge", "fuga", "piyo"};

  struct SStore  {
    std::string name;
    int something;
  };

  SStore stores[3];
  int i = 0;
  for (std::vector<std::string>::iterator iter = VNames.begin(); iter != VNames.end(); iter++  ){
    stores[i].name = *iter;//ここで文字コードの問題が発生したため、データを触りたくなった
  }

  std::cout << stores[2].name << std::endl;
  
  return 0;
}
#include <iostream>
#include <vector>
#include <string>

int main (void){
  std::vector<std::string> VNames = {"hoge", "fuga", "piyo"};

  struct SStore  {
    std::string name;
    int something;
  };

  SStore stores[3];
  int i = 0;
  for (std::vector<std::string>::iterator iter = VNames.begin(); iter != VNames.end(); iter++  ){
    stores[i].name = *iter;//ここで文字コードの問題が発生したため、データを触りたくなった
  }

  std::cout << stores[2].name << std::endl;
  
  return 0;
}
No one still commented. Please first comment.