# Quick Question

 Skill Shot · March 28, 2015 Hello guys,I started programming like 2 days ago and I totally fell in love with thenewboston's awesome tutorials about C programming on youtube, which brought me here I don't know if there is a section for presentations, if so i'll get there to present myself I just have a little question about the "C Programming Tutorial - 10 - Creating a Header File".I past what i wrote :___________(main.c) <--- file11     #include 2     #include 3     #include "TEST2.h"45     int main()6     {78     int BMI = Weights/Heights*Heights;                                      (<-- i don't know how to square a number, same for cube, etc)9     printf("My BMI equals to %d\n\n", BMI);1011   return 0;1213   }___________(TEST2.h) <--- file21     #define Weights = 692     #define Heights = 175___________When i build and run it shows a problem at this lign :  int BMI = Weights/Heights*Heights; but i really don't know why...If someone can help me it would really be nice Thank you by advance.

## Replies

 Dol Lod · March 28, 2015 Macros do not use equal signs when you simply want to define a constant like an intHere is an example of how to define a macroex. 1#define Weights 69ex.2 #define Heights 175Include math.h for computations involving exponents and look at the pow function. Skill Shot · March 28, 2015 Mhh yup it's a mistake i made on the forum.The file2 in my program is "TEST2.h", i just forgot to add the "2" on the forum, i'll modify my previous post.So i still dunno why it doesn't want to build and run For the math.h thing i don't understand what you mean but maybe i'll discover later.Anyway, thanks for answering Skill Shot · March 28, 2015 Ahh you are right, i was using the equal sign to define something Now I can build and run the program again, perfect ! Thanks a lot for helping me Arjun Patel ! Dol Lod · March 28, 2015 Np.
• 1

## C

122,967 followers