Answer to Question #5916 in C++ for kuldeep

Question #5916
how to #define in c++.Give me an example also
1
Expert's answer
2012-01-10T11:24:27-0500
Example:
#define PI 3.14159
#define PI 3.14 + 0.00159

Nested:
#include <iostream.h>
#define WHISKEY "Whiskey"
#define MARTINI "Martini and " WHISKEY
void main() {cout << MARTINI;}
output: Martini and Whiskey

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS