S
shemgwapo
Guest
im practically new to c++ coding and i have this little problem..
how do you swap chars? i mean lets say it goes something like this
cout<<"enter word";
cin>>word;
cout<<"pos";
cin>>pos;
lets say you enter a word "Hello"
and you enter a numer "2" in pos.
my problem is since i entered the number "2"
i want the output to be "llohe"
and if i enter in the pos 3
the output would be "lohel"
anyone could give me a code on how to do it? pls? thanks in advance..
how do you swap chars? i mean lets say it goes something like this
cout<<"enter word";
cin>>word;
cout<<"pos";
cin>>pos;
lets say you enter a word "Hello"
and you enter a numer "2" in pos.
my problem is since i entered the number "2"
i want the output to be "llohe"
and if i enter in the pos 3
the output would be "lohel"
anyone could give me a code on how to do it? pls? thanks in advance..