Jump to content

if(y[0]==let)

Go to solution Solved by LorenzArnua,

y[0] is the pointer to whole string

just try cout<<y[0]; and see it yourself

 

you want to access first letter of char array so y[0][0]

 

        0123

y[0]  Jack

y[1]  Sarah

If you explain more you are trying to do we can help dont know which language it is

 

well let me try

 

are you tring to match first letter of chars maybe?

than in pseudo code

 

for(int i = 0; i<y.length; i++){

  if(y[0]==let){

    sum = sum+x;

  }

}

are you tring to match first letter of chars maybe?

 

This and C++

Link to comment
https://linustechtips.com/topic/273196-ify0let/#findComment-3708854
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×