??? 07/22/04 05:48 Read: times |
#74665 - What do you doubt? Responding to: ???'s previous message |
Annibal Hoeschl Abreu said:
And what about: sprintf(auxBuf,"%s",par->INPS->szInterface);Is it ok too ? My main doubt is par->INPS->szInterface What exactly do you doubt about it? It is perfectly valid 'C', and looks sensible - but what are you expceting it to do? Your original comment is not correct: // to set auxBuf with szInterface address sprintf(auxBuf,"%s",par->INPS->szInterface);It does not set 'auxBuf' to the address of 'szInterface'; rather, it takes 'szInterface' to be the starting addressof a null-terminated string, and copies the string contents into 'auxBuf' In this case, note that the "%s" is superfluous - you just need:: // print szInterface to auxBuf sprintf( auxBuf, par->INPS->szInterface );(or use one of the string copy functions). Note that this is all standard ANSI 'C' stuff - nothing specific to the 8051 at all |
Topic | Author | Date |
doub about strutc pointers | 01/01/70 00:00 | |
RE: doub about strutc pointers | 01/01/70 00:00 | |
RE: doub about strutc pointers | 01/01/70 00:00 | |
What do you doubt? | 01/01/70 00:00 | |
RE: What do you doubt? | 01/01/70 00:00 | |
RE: What do you doubt? | 01/01/70 00:00 | |
RE: What do you doubt? | 01/01/70 00:00 | |
RE: What do you doubt? | 01/01/70 00:00 | |
RE: What do you doubt? | 01/01/70 00:00 | |
RE: What do you doubt? | 01/01/70 00:00 | |
RE: What do you doubt? | 01/01/70 00:00 | |
RE: undefined behaviour land | 01/01/70 00:00 | |
RE: What do you doubt? | 01/01/70 00:00 | |
Still unknown doubt | 01/01/70 00:00 | |
RE: doub about strutc pointers | 01/01/70 00:00 | |
Nothing 8051-specific here | 01/01/70 00:00 | |
RE: Nothing 8051-specific here | 01/01/70 00:00 | |
RE: doub about strutc pointers | 01/01/70 00:00 | |
RE: doub about strutc pointers![]() | 01/01/70 00:00 |