I am am for the first time here,since it is the first time I needed help.I have read all the rules and I agree with you for the homework case...But this is getting frustrating!I am working on this on my own,practicing for the mid term but what am I doing wrong?
#include <iostream>
#include <string>
using namespace std;
void main ()
{
int i;
char is[]="Vnesi string: ", vs[100];
cout<<is;
cin.getline(vs, 100);
cout<<vs<<endl;
char im[1];
im[0]='p';
for(i=0;i<strlen(is);i++)
{
if(is[i]=='d')strcpy(&is[i],im[0]);
cout<<is;
}
cin>>is;
}
It keeps returning this error and soma more if i change something:(cannot convert parameter 2 from 'char' to 'const char *'
I will appreciate your help very much,I would love to get this cleared.
Btw,my assignment is to replace one character with another.I know strcpy is just coping but that was the best I could think of.Thanks again.
This string thing really confuses me...