View previous topic :: View next topic |
Author |
Message |
ljbeng
Joined: 10 Feb 2004 Posts: 205
|
18F252 |
Posted: Tue Mar 30, 2004 1:41 pm |
|
|
The compiler tell me "A numeric expression must appear here" and it highlights "wday"
char wday(9);
if (dow == 1 ) strcpy(wday, "Sunday ");
if (dow == 2 ) strcpy(wday, "Monday ");
if (dow == 3 ) strcpy(wday, "Tuesday ");
if (dow == 4 ) strcpy(wday, "Wednesday");
if (dow == 5 ) strcpy(wday, "Thursday ");
if (dow == 6 ) strcpy(wday, "Friday ");
if (dow == 7 ) strcpy(wday, "Saturday "); |
|
|
valemike Guest
|
use [] instead of () |
Posted: Tue Mar 30, 2004 1:43 pm |
|
|
If wday is an array, you should use [9], not (). |
|
|
ajt
Joined: 07 Sep 2003 Posts: 110
|
Need 10 Bytes |
Posted: Tue Mar 30, 2004 11:30 pm |
|
|
Shouldn't that be wday[10] to allow for the /0 to null-terminate the string? _________________ Al Testani |
|
|
|