[Dev-C++] Re: How to copy ctime(timer);
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <Rub...@al...> - 2005-04-25 14:06:03
|
Hello LETCHUMANAN
I think you have made two mistakes:
1.- In structure record, time is defined as char. You must define=20
it as char[ ] or char * for using it as destination in the command strncpy(=
data.time,ctime(timer));
2.- strncpy needs three arguments (char *dest, const *char=20
source,size=5Ft maxlen). The last argument is the number of characters to=20
copy.
Regards.
Ruben Savia
Ingeniero Electr=F3nico
Datacom Services
eBD - eBusiness Division
Alcatel de Argentina S.A.
e-mail : rub...@al...=20
Phone: 5411 4349 - 1111 ext.1001
Fax: 5411 4349 - 1199
Alcanet : 2930-1001
Web site: www.ind.alcatel.com=20
|