phplove Posted May 16, 2009 at 08:35 PM Report #264706 Posted May 16, 2009 at 08:35 PM viva malta estou aqui a tentar comparar um arrey inteiro com uma string mas n estou a ver como sera que dava para ajudar ja tentei isto : while (fscanf(f, "%s", line) != EOF) { if ( line == "end") exit(1); } ou assim while (fscanf(f, "%s", line) != EOF) { if ( line =={ "end"}) exit(1); } ou assim while (fscanf(f, "%s", line) != EOF) { if ( line == {'e'',n','d') exit(1); } mas nada da :
Ferreira Posted May 16, 2009 at 09:10 PM Report #264721 Posted May 16, 2009 at 09:10 PM Essa comparação deve ser feita com a função strcmp. http://twitter.com/ferreira
phplove Posted May 16, 2009 at 09:21 PM Author Report #264727 Posted May 16, 2009 at 09:21 PM muito obrigado ja esta a bomba
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now