What is the correct syntax for the last line???
#include <vector>
#include <stdio.h>
struct TestType {
double ONE;
double TWO;
};
void main()
{
TestType Record;
std::vector<TestTypeTest;
for (double N = 111.0; N <= 122.0; N++) {
Test.push_back(Record);
Test.back().ONE = N;
Test.back().TWO = N / 3.0;
}
for (int M = 0; M < Test.size(); M++)
printf("Test[%02d].ONE--->%6.2f
Test[%02d].TWO--->%6.2f\n",
M, Test[M].ONE, M, Test[M].TWO);
printf("Test.back().ONE--->%6.2f
Test.back().TWO--->%6.2f \n",
Test.back().ONE, Test.back().TWO);
// printf("Test.back().ONE--->%6.2f\n",
(Test.back() -1).ONE);
}