Why i am getting a wrong answer in Chef and Chain (CHEFCH)

//Here is my code

#include<iostream>
#include<string>
using namespace std;
int main(){
    int testcase = 0,i = 0,cnt = 0;
    cin>>testcase;
    string s;
    if(testcase>1 && testcase<=7)
    for(;testcase>0;testcase--){
    cin>>s;
    cout<<s.size();
    if(s.size()>=1 && s.size()<=100000)
        for(i=0;i<s.size();i++){
            if(s[i] == '+'){
                if(s[i+1] == '-'){
                    
                }else{
                      s[i+1] = '-';
                      cnt++;
                }
            }else{
                if(s[i+1] == '+'){
                    
                }else{
                      s[i+1] = '+';
                      cnt++;
                      }
                    
                }
            }
        cout<<cnt<<endl;
        cnt = 0;
        }
        return 0;
    }

Why do you keep printing s.size() after every time you read s?

Also, your program tries to see if the next character is not equal to the current. This is ok. But, what about the first character? Currently, you are just keeping the first character as such, and then counting how many characters need to be changed. It might be the case the first character itself needs to be changed, in order to find the right answer.

1)sorry for that s.size(). I forget to remove that while pasting my code.

2)can u suggest me that testcase which giving me wrong answer.

Try the string +±±±±+
The correct answer is 1 (just change very first character to -)

thanks dude