title: ostringstream variable not working
body: <p>i have the following code in a function-></p>
  
  <pre><code>                 ostringstream loading_csv_query;
                   ostringstream get_last_id_query;
                   in.getline(h1,255);
                   previouscount=this-&gt;getlastcount();
                   get_last_id_query &lt;&lt; "set @count= "
                                     &lt;&lt; previouscount ;
                   string pp=get_last_id_query.str();
                   if(mysql_query(con,get_last_id_query.str().c_str()))
                   loading_csv_query &lt;&lt; "LOAD DATA INFILE '" &lt;&lt; h1 &lt;&lt; "' " 
                                 &lt;&lt; "INTO TABLE "&lt;&lt; g
                                 &lt;&lt; "FIELDS  TERMINATED BY ',' "
                                 &lt;&lt; "ENCLOSED BY '\"' "
                                 &lt;&lt; "LINES TERMINATED BY '\\n' "
                                 &lt;&lt; "IGNORE 2 ROWS"
                                 &lt;&lt;"(@sno,@var1,line,section,station,system,sub_system,equipment,sub_equipment,failure_time,rectified_time,duration,failure_description,rectification,lmd,origin,attended_by,reported_by,urr,@a1,@a2,@a3)"
                                 &lt;&lt;"set id = (@count :=@count+1), failure_date =STR_TO_DATE(@var1, '%c/%e/%Y')";
          string h=loading_csv_query.str();
          query_state=mysql_query(con,loading_csv_query.str().c_str());
  </code></pre>
  
  <p>the h variable is always " " and does'nt take the string.</p>