Not much to say really...this isn't working and I don't have a clue how to fix it without putting them all in separate statements which I assume you wouldn't have to do. Anyway, here it is:
angle = 2 * PI * i / circle_points;
If it matters, angle is a double, PI is a #defined double, i is an integer and circle_points is an integer.
This code below does not interpret integers as pointers. What are you doing differently?
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <iostream>
#define PI 3.14159
int main()
{
double angle;
int i = 10;
int circle_points = 50;
angle = 2 * PI * i / circle_points;
std::cout << angle;
return 0;
}
When you compile the preprocessor replaces PI in the code with 3.141592653589793238462643383279503;, so the line with the error becomes: double angle = 2 * 3.141592653589793238462643383279503; * i / circle_points;
Edit:
It would be better to use: constdouble PI = 3.1etc.; instead of #define...