Skip to content

Instantly share code, notes, and snippets.

@orontee
Created September 25, 2013 14:54
Show Gist options
  • Save orontee/6700812 to your computer and use it in GitHub Desktop.
Save orontee/6700812 to your computer and use it in GitHub Desktop.
#include <iostream>
const float GAIN(1.5);
void
multiply(float *f)
{
(*f) *= GAIN;
}
void
multiply_long(float *f)
{
(*f) = (*f) * GAIN;
}
void
multiply_with_temp(float *f)
{
float t = *f;
t = t * GAIN;
*f = t;
}
int main()
{
float *const f = new float(1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment