From the given code below everytime i need to print the name as rama+value of the integer variable.
if i=10;
then the output:rama10 should be printed... i have probelm to add string to the integer variable..please help anyone...thanks in advacne...
class abc
{
private:
int a,i;
string name;
public:
void setvalues(int i) //set values of the data members of the abc class.
{
a=1; covalent_radius=1.6;
name="rama"+i;
cout<<name<<endl;
}
};