Hello,
I have a problem with my code, but I don’t have any idea what’s wrong.
There is: "error: expected ‘)’ before ‘c’ "
#include < iostream >
#include < string >
using namespace std;
int main(){
int b,c;
string slowo;
cin>>slowo;
for (int i=0; i<slowo.length(); i++)
{
if (slowo[i]==slowo[i+1])
{
for(int j=0, k=i; slowo[k]!=slowo[k+1]; j++,k++)
{
b=j;
c=k;
}
slowo[i]=b;
for (int l=i; c<slowo.length(); l++ c++) // here is a problem with compilation
{
slowo[l+2]=slowo[c];
}
}
}
cout<<slowo;
return 0;
}