# c++ special mathematical symbols.



## de.das.dude (Nov 5, 2013)

Is there a way to declare variables as special characters like "theta", " beta" etc?
i need to use a temp difference in my program and it would be awesome if i could use theta symbol.

thanks!


----------



## hellrazor (Nov 5, 2013)

Nope.


----------



## caleb (Nov 5, 2013)

imagine that integers are those symbols and write a layer for it


----------



## de.das.dude (Nov 5, 2013)

caleb said:


> imagine that integers are those symbols and write a layer for it



layer?
lol. all the c++  i learnt was in high school.
you have to explain like you are explaining to a mechanical engineering student XD


----------



## Fourstaff (Nov 5, 2013)

Nope, you will have to spell them out.


----------



## Steevo (Nov 5, 2013)

Named constant. 

http://www.cplusplus.com/forum/beginner/28089/

I have never tried using a symbol, wouldn't hurt to try though.


----------



## Fourstaff (Nov 6, 2013)

http://en.wikipedia.org/wiki/SymbolicC++


----------



## de.das.dude (Nov 6, 2013)

i just spelled them out  for now


----------



## FordGT90Concept (Nov 6, 2013)

If it is a Unicode character, it wouldn't hurt to try.

Alpha: α
Beta:  β
Delta: Δ
Gamma:  γ
Theta:  θ
Zeta: ζ

List here: http://www.fileformat.info/info/unicode/block/greek_and_coptic/list.htm

Should be able to copy and paste from the "browser" column.


----------



## alexstone (Nov 22, 2013)

Everything you need are already existing include <math.h>


----------



## Aquinus (Nov 22, 2013)

This is C, not MatLab! Just spell out your variable names or shorten them. I'm pretty sure that it won't take kindly to using UTF-8/Extended ASCII chars for variable names.

Edit: I should add that using symbols doesn't make it easier to read or manipulate your code. Keep it simple and don't overthink it.


----------



## BiggieShady (Nov 22, 2013)

Single letter variables make a lot of sense in math given how multiplication has a short notation (when multiplication operator is omitted).
For use in programming languages it's preferable to have descriptive variable names.


----------

