How do I make a greeting a named constant rather than a literal constant?
I'm not sure if I completely understand what you are asking.
#include <stdio.h>
int main( void )
{
const char named_constant[] = "string literal initializer";
puts("literal constant"); /* (1) */
puts(named_constant); /* (2) */
return 0;
}
/* my output
literal constant
string literal initializer
*/
Are you asking how to do (2) instead of (1)?
Dave Sinkula
long time no c
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
How do I make a greeting a named constant rather than a literal constant?
cford,
Welcome to TechTalkForums. In the future, please name your thread something meaningful. "HEELLLPPPP!!!! Due Tomorrow 9-14-04" doesn't tell us anything about what you need. "Making a named constant", or something similar would have been more appropriate.
alc6379
Cookie... That's it
2,820 posts since Dec 2003
Reputation Points: 186
Solved Threads: 147