I have a simple if statement going from 0-360 in 30 degree increments. I want to store those values into into an array because I need to use them for simple calculations later. I think I need an dynamic array because what I tried below is not working.
So I guess I have two questions. One is how much I get my array to store the values of x1.
Also, when I get my array working and lets say I want to do a calculation with 30 (lets say array[1]) can I just do randomvariable = array[1] * 2.0?
#include<iostream>
#include <vector>
using namespace std;
int main()
{
double l1=25.0, l2=5.0, l3=20.0, l4=10.0 x1;
int array1[13];
for(x1=0.0; x1<361.0; x1+=30.0){
x1 = array1;
}
char x;
std::cin>>x;
return 0;
}
Regards,
-m