Re: C function prototype
- From: Vincent Fatica <vince@xxxxxxxxxxxxxxxxx>
- Date: 12 Apr 2008 20:00:54 -0400
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
.
- Prev by Date: Compiler chooses conv ctor - why?
- Next by Date: Re: c++ event sink
- Previous by thread: Compiler chooses conv ctor - why?
- Next by thread: Re: c++ event sink
- Index(es):
Relevant Pages
|