8 QUEEN in C using recursion and stack
===

I could not find what is wrong in my code . please help as there are many solutions available on internet. But I just want where my code is getting as on paper its working fine.I am starting from (0,0). and start storing column  value at index = row. such that if we start from (0,0) so s.a[0]=0; then going to function direction where Am checking first whether all the queens have been placed or not.
After that I am again starting loop and checking the condition so that no Queen cut each other. I f I get a solution then again pushing value to stack and moving head by calling recursion otherwise popping the previous value and returning. 

    #include<iostream>
    #include<conio.h>
    using namespace std;
    struct symbl 
    {
       int top;
       char c[1000];
    };
    char pop(struct symbl *s)
    {
     return(s->c[(s->top)--]);
    }
    void push(struct symbl *s,char a)
    {
     s->c[++(s->top)]=a;
    }
    int empty(struct symbl *s)
    {
     return(s->top==-1);
    }
    void direction(struct symbl *s,int *count)
    {
      int i,j,k,l;
     if(s->top==7)
     (*count)++;
     else
     {
        int  row=s->top;
         row++;int z;
         for(i=0;i<8;i++)
         {
                          z=1;
                         for(j=0;j<row;j++)
                         {
                                           if((s->c[j]==i)||((s->c[j]-i)==(j-row))||((s->c[j]-i)==(row-j)))
                                           {
                                           i++;z=0;
                                           break;
                                           }
                         }
                         if(z)
                         {
                              push(s,i);
                              direction(s,count);
                         }
         }
     int x=pop(s);
     return;
                                        
     }
          
     }
     int main()
     {
     int n=8,i;
     int count=0;
     for(i=0;i<8;i++)
     {
                    struct symbl s;
                    s.top=-1;
                    push(&s,i);
                    direction(&s,&count);
     }
     cout<<count<<endl;
     getch();
     }

thanks in advance.