title: Dynamic Structs in C++
body: <p>For a project in C++ (I'm relatively new to this language) I want to create a structure which stores a given word and a count for multiple classes. E.g.:</p>
  
  <pre><code>struct Word
  {
    string word;
  
    int usaCount     = 0;
    int canadaCount  = 0;
    int germanyCount = 0;
    int ukCount      = 0;
  }
  </code></pre>
  
  <p>In this example I used 4 classes of countries. In fact there are hundreds of country classes.</p>
  
  <p>My questions regarding this are the following:</p>
  
  <ol>
  <li>Is there any way to generate this list of countries dynamically? (E.g. there is a file of countries which is read and on that basis this struct is generated)</li>
  <li>Fitting for this struct should be a function which increments the count if the class is seen. Is there also a way to make this "dynamic" by which I mean that I want to avoid one function per class (e.G.: incUsa(), incCanada(), incGermany() etc.)</li>
  <li>Since I'm not really used to C++: Is this even the ideomatic approach to it? Perhaps there's a better data structructure or an alternative (and more fitting) way to result the problem.</li>
  </ol>
  
  <p>Thanks in advance.</p>