I some problem to solve this is our 2nd mid-term quiz in my c++ class.

this is my current code:

Code:
#include<iostream>
#include<string.h>
#include<conio.h>
#include<ctype.h>

using namespace std;

main()
{
    char string[30];
    int x,counter,len;
    cout<<"enter string: ";
    gets(string);
    len=strlen(string);
   for (x=0; x<=len-1; x++)
    {    
        if ('string'=='(')
        {
            counter=0;
            cout<<"\ncounter: "<<counter;
            cout<<"\nValid match";
         }
         else if ('string'==')')
         {
             counter=1;
             cout<<"\ncounter: "<<counter;
             cout<<"\nInvalid match";
         }
     }         
         
     
    getch();
}
my instructor said that the program will only search for the '(' and ')'. if the entered string is only '(' or ')' then it is invalid match. now, it the entered string is '()' then it is a valid match. more examples is.. if the user inputs '(())' the program will count how many '(''s and how many ')'s.. then after that is subtract the number of '(' to the number of ')'... how will i gonna do these conditions??? please...