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;

}

  • created

    Feb '18
  • last reply

    Feb '18
  • 1

    reply

  • 651

    views

  • 1

    user

Suggested Topics

Topic Category Replies Views Activity
C and C++ 0 16 8d

Want to read more? Browse other topics in C and C++ or view latest topics.