[gameprogrammer] problem filling a buffer

I have a problem with the udp packet data creation. I still dont deeply underestand pointers, and I need to fill the data buffer with several different data, like this: command, user login string length, login string, password string length, password string For simple data types like integers I have a working method. But when I send strings I receive some extra garbage at the end, making the login process fail.
I would appreciate any suggestion to deal with this problem

--
http://dsgp.blogspot.com | Linux, programación, juegos
Have no place I can be since I found Serenity
But you can’t take the sky from me

                
______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com

---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: