Re: C function prototype

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Sat, 12 Apr 2008 15:47:37 -0700, June Lee <iiuu66@xxxxxxxxx> wrote:

// concatenate a string with a "stringized" integer
void stradd (char *s1, int i)
{
char temp[80];

sprintf (temp, "%d", i);
strcat (s1, temp);
}

Perhaps (?)

void stradd ( char *s1, int i )
{
_itoa( i, s1 + strlen(s1), 10 );
}

//SYSTEMTIME st = {0,0,0,0,0,0,0,0}; // cannot divide into 2
lines - must init all in one line

Quite acceptable (though pointless):

SYSTEMTIME st =
{
0
,
0, 0, 0,
0, 0, 0,
0
};
--
- Vince
.



Relevant Pages