title: ‘setprecision’ is not a member of ‘std’
body: <p>Errors:</p>
  
  <pre><code>~&gt; g++ ssstring.cpp
  ssstring.cpp: In function ‘int main()’:
  ssstring.cpp:12:31: error: ‘setprecision’ is not a member of ‘std’
  ssstring.cpp:12:52: error: ‘numeric_limits’ is not a member of ‘std’
  ssstring.cpp:12:74: error: expected primary-expression before ‘float’
  ssstring.cpp:13:30: error: ‘setprecision’ is not a member of ‘std’
  ssstring.cpp:13:51: error: ‘numeric_limits’ is not a member of ‘std’
  ssstring.cpp:13:73: error: expected primary-expression before ‘float’
  ssstring.cpp:14:28: error: ‘setprecision’ is not a member of ‘std’
  ssstring.cpp:14:49: error: ‘numeric_limits’ is not a member of ‘std’
  ssstring.cpp:14:71: error: expected primary-expression before ‘float’
  anisha@linux-trra:~&gt;
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>#include &lt;sstream&gt;
  #include &lt;iostream&gt;
  #include &lt;string.h&gt;
  
  int main ()
  {
      // Convert `lat`, `lons`, and `vehicleId` to string.
      float selectedPointLat = 2.2;
      float selectedPointLng = 2.3;
      float vehicleId        = 1.0;
  
      std :: stringstream floatToStringLat, floatToStringLng, floatToStringVehicleId;
  
      floatToStringLat       &lt;&lt; std :: setprecision (std :: numeric_limits&lt;float&gt; :: digits10 + 1); floatToStringLat  &lt;&lt; selectedPointLat;
      floatToStringLng       &lt;&lt; std :: setprecision (std :: numeric_limits&lt;float&gt; :: digits10 + 1); floatToStringLng &lt;&lt; selectedPointLng;
      floatToStringVehicleId &lt;&lt; std :: setprecision (std :: numeric_limits&lt;float&gt; :: digits10 + 1); floatToStringVehicleId &lt;&lt; vehicleId;
  
  }
  </code></pre>