Leudassdf Posted April 16, 2012 at 08:45 PM Report #449471 Posted April 16, 2012 at 08:45 PM como posso comparar uma string? do genero faço esta declaraçao:char escolha(5); e quero saber se ele e igual x. como posso comparar num if?
petvetbr Posted April 16, 2012 at 08:50 PM Report #449472 Posted April 16, 2012 at 08:50 PM use strcmp: http://www.cplusplus.com/reference/clibrary/cstring/strcmp/ http://pt.wikibooks.org/wiki/Programar_em_C/Strings http://www.mtm.ufsc.br/~azeredo/cursoC/aulas/c520.html Fernando Lage Bastos - MCP/MCTS/MCPD
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