I'm creating a library which will have concepts similar kind of python.
C doesn't have any power operator like python has (**
) (e.g. pow(x,n)
is equivalent to x**n
in python).
I tried to solve this problem using a Pre-Processor directive. but didn't find any trick.
Since ^ this operator is for XOR operation so I think it cannot be used for power operator(can we?)
so alternative solution is double star(**
) because **
is unrecognized operator to compiler so how can we make this known to compiler.
suggest approach or solution for this.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…