title: request for member ‘c_str’ in ‘str’, which is of non-class
body: <pre><code>main.cpp:561:80: error: request for member ‘c_str’ in ‘str’, which is of non-class type ‘std::string [10] {aka std::basic_string&lt;char&gt; [10]}’
     displayFont.showHighscore[i] = TTF_RenderText_Solid(displayFont.menuFont,str.c_str(), displayFont.colorText);
  </code></pre>
  
  <p>Hi all!</p>
  
  <p>According this function, this shows a ranking with data that is retrived from a member class. Also this used ttf content from another class (displayFont). When I compile this, said an error. I leave the code:</p>
  
  <pre><code>void showHighscore() {
  
      displayFont.menuFont = TTF_OpenFont("fonts/Lanehum.ttf",25);
      displayFont.colorText = { 255, 255, 255 }; // Add content
  
      stringstream texting[10]; // Variables
      string str[10];
      SDL_Rect posHighscore[10];
  
      for (int i = 0; i &lt; 10; i++) {
          texting[i] &lt;&lt; i &lt;&lt; "#    - " &lt;&lt; dat.topScore[i];
          str[i] = texting[i].str();
          displayFont.showHighscore[i] = TTF_RenderText_Solid(displayFont.menuFont,str.c_str(), displayFont.colorText); // OUTPUTTING ERROR :/
          posHighscore[i].x = 50; 
          posHighscore[i].y = 50 * (i+1);
      }
  
      while (true) {
          for (int i = 0; i &lt; 10 ; i++) {
              SDL_BlitSurface(displayFont.showHighscore[i],NULL,screen,&amp;posHighscore[i]);     
          } // Show the rendered text
  
          SDL_Flip(screen);
          SDL_Delay(5000);
          break;
      }
  }
  </code></pre>