Hey all,
I'm new to C++, much more at home with mathlab or VBA so this is probably a simple problem for you guys. I am writing a program and I want to change values at the end of loop but keep answers from previous loop, i.e. in other programs this approach works:
int i = 1;
for (time = 0;time <= 518400; time = time + 0.02)
{
>> my calculations
load_effect(i) = (result from calculations);
i = i + 1;
}
I have been been flicking through books and online and I'm not sure if C++ has this option, so I was going to output the data in text files. But as I have 3-4 data types which I will need to reuse in the program I need to save them to separate text files. I am getting a:
c++ error C2086: 'myfile' : redefinition
message when I try and use a second output file. Can anyone please help with this problem. Thanks in advance.
Colm.