dioguito Posted April 9, 2009 at 01:17 PM Report #256067 Posted April 9, 2009 at 01:17 PM boa tarde tenho uma duvida que é a seguinte eu queria criar um id mas que tive-se caracteres e inteiros. ex:alu001; se alguem me podesse ajudar agradecia. Cumprimentos Diogo Martins
Solution Rui Carlos Posted April 9, 2009 at 01:25 PM Solution Report #256070 Posted April 9, 2009 at 01:25 PM Podes usar a função sprintf. Rui Carlos Gonçalves
gunky Posted April 9, 2009 at 01:26 PM Report #256071 Posted April 9, 2009 at 01:26 PM lol p1 isec.... rapaz tanto podes utilizar itoa() ou atoi();
dioguito Posted April 9, 2009 at 01:58 PM Author Report #256080 Posted April 9, 2009 at 01:58 PM lool ya por acaso é brigado nao me lembrava
The Loser Posted April 10, 2009 at 04:29 PM Report #256186 Posted April 10, 2009 at 04:29 PM atoi e itoa não são standard C99 nem C90, e na minha opinião devem ser evitados sempre que possível. Usa a sprintf como disse o Rui Carlos. I intend to live forever. So far so good.
Ferreira Posted April 10, 2009 at 05:06 PM Report #256196 Posted April 10, 2009 at 05:06 PM A atoi é standard, a itoa é que não. Mas de qualquer forma parece-me preferível usar a sprintf. http://twitter.com/ferreira
The Loser Posted April 10, 2009 at 05:12 PM Report #256199 Posted April 10, 2009 at 05:12 PM A atoi é standard, a itoa é que não. Omfg, tens razão. Afastei-me do C e agora já não sei nada. 👍 Nevertheless, mesmo que seja, não devia ser.. I intend to live forever. So far so good.
Rui Carlos Posted April 10, 2009 at 07:57 PM Report #256224 Posted April 10, 2009 at 07:57 PM O atoi é standard, mas não estou a ver a sua utilidade neste caso. Rui Carlos Gonçalves
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