No. Scientific notation is only for constant values. Those values are determined at compile time, while the value you want to get is determined at runtime.
You'll have to use something like int result = pow(10,n). Keep in mind that std::pow returns double values.
I am assigned some old code and when I was reading through it, I noticed it had these in the form of:
float low = 1e-9;
float high = 1e9;
float lowB = 1e-9;
float highB = 1e9;
float lowL = 1e-9;
float highL = 1e9;
…
I was looking for examples on how to do something and saw this two variants:
std::string const &s;
const std::string &s;
in different snippets.
thx for your answer :)
Possible Duplicate:
c++ * vs & in function declaration
I know that this probably seems like an incredibly elementary question to many of you, but I have genuinely had an impossible time finding a good, thorough explanation, despite all my best …