int main(int argc, char *argv[]) {
// You had a '.' between Paramenters and parameter
Parameters parameter;
for (int k=0;k<6;k++) {
std::string L;
L = parameter.CylinderName(k)+"RadialDistance";
cout << L << endl;
// I don't know what A and Cylinder are
//A.Cylinder(parameter.L());
}
}
I guess I just don't like that functions are looked up by strings during runtime. Mostly because it's unnecessary slow.
Can't you have a function like CylinderName that instead executes the correct function depending on the number you pass in. That way you don't have to care about the function names.
If you really need function lookup by name I guess my solution is not that bad.