How do I make a greeting a named constant rather than a literal constant?
cford
0
Newbie Poster
Recommended Answers
Jump to Postrather than
printf("Greetings!\n");
You could use:
const char* greeting = "Greetings!\n";
printf( greeting );
All 3 Replies
Chainsaw
12
Posting Pro in Training
Dave Sinkula
2,398
long time no c
Team Colleague
alc6379
120
Cookie... That's it
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.