• Courses
  • Code Compiler
  • Discuss
  • Pricing
  • Teams
Menu
0

When to use #define?

for ex- #define PI 3.14

t
18th Apr 2018, 5:22 PM
ELECTRICAL ENGINEER
ELECTRICAL ENGINEER - avatar
1 Answer
+ 2
https://stackoverflow.com/questions/6274008/why-would-someone-use-define-to-define-constants?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa But also useful to stop a .hpp or .h file being processed more than once. #ifndef __fred__h__ #define __fred__h__ // put innards of .h file here. #endif
18th Apr 2018, 6:28 PM
Emma

Often have questions like this?

Learn more efficiently, for free:

  • Introduction to Python

    7.1M learners

  • Introduction to Java

    4.7M learners

  • Introduction to C

    1.5M learners

  • Introduction to HTML

    7.5M learners

See all courses
Hot today
Python Developer
0 Votes
hi my coding instor told me to make a calculator that find the average of two numbers can you pls tell me my erro
0 Votes
Question
1 Votes
Hi guys I need some one to teach the String name how I can do it true because when I finish coding they give me NO OUTPUT
1 Votes
Wayss
0 Votes
generic programming understanding memory ownership
0 Votes
fully dynamic arrays
1 Votes
I dont now that how to do js
2 Votes
Can someone help with teaching me this coding of a thing
0 Votes
Project subjection
0 Votes