• Cours
  • Compilateur de code
  • Discuter
  • Tarification
  • Équipes
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 Réponse
+ 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

Vous avez souvent des questions comme celle-ci ?

Apprenez de maniĂšre plus efficace, gratuitement :

  • Introduction Ă  Python

    7.1M apprenants

  • Introduction Ă  Java

    4.7M apprenants

  • Introduction Ă  C

    1.5M apprenants

  • Introduction Ă  HTML

    7.5M apprenants

Voir tous les cours
Aujourd'hui en vedette
Functions in python
2 Votes
How to make a playground
1 Votes
For Mobile app
0 Votes
How can you find whether a number is odd or even in a different way(other than (x%2==0))?
1 Votes
I need advice
1 Votes
Html 5 document question
1 Votes
this query always result to be incorrect from Sorting Data lesson
1 Votes
Python
0 Votes
đ™”đ™žđ™œđ™ł đšƒđ™·đ™Ž đ™žđ™œđ™żđš„đšƒ đ™Ÿđ™” đšƒđ™·đ™Ž đ™żđšđ™Ÿđ™¶đšđ™°đ™Œ
1 Votes
Can someone explain inline and block elements please
0 Votes