![]() |
doubt in string manipulation
Hi all
Since i am more conversant with assembly programming my knowledge in c is very limited . Just have a small boubt there is a function createEAPfile( char *IMSI) now i have to create a disk resident file which should look like the following User-Name = "eapsim" NAS-IP-Address = marajade.sandelman.ottawa.on.ca EAP-Code = Response EAP-Type-Identity = "eapsim" Message-Authenticator = 0 NAS-Port = 0 -------------------------------------------- Here i have to update the User-Name with the value present in *IMSI say IMSI=102AD456780 but at the same time i should have double quotes too i tried the following char *p = "User-Name = \"IMSI\""; but output is User-Name = "IMSI" but what i want is User-Name = "102AD456780" how to get this value of IMSI insted of printing IMSI itself. Thanks in advance; regards Punith |
Re: doubt in string manipulation
Use strcat or strncat, and dereference the pointer. You don't show enough code for me to give you an example.
|
Re: doubt in string manipulation
Ya got it DaWei thanks a lot
Code:
#include <unistd.h> |
| All times are GMT +5.5. The time now is 15:30. |