calling function multiple times with differnt arguments
<p>I have a multiple arguments of type</p>

<pre><code>string m_strVar1 = "var1";
string m_strVar2 = "var2";
string m_strVar3 = "var3";
// i have like above like 10 variables.


for(int i = 1; i &lt; 10 ; i++) {
string strArg = "m_strArg";
std::stringstream lStream;
lStream &lt;&lt; argCnt;
strArg.append(lStream.str());
cout &lt;&lt; "first argument is " &lt;&lt; strArg.c_str() &lt;&lt; endl;

// call the function
func1(strArg.c_str());
}


///////////////

void func1(string&amp; arg1) {
    // here i am expecting to access m_strVar1/2 value, depending on argument but value is not shown.
}
</code></pre>

<p>I think i am doing some thing wrong. can u please correct me. How can we achieve for calling the function with out calling 10 times with differnt values.</p>

<p>Thanks!</p>
