string filename="C:/parameters.txt" // can also use relative paths
Stream input = read filename
string param
input >> param //this reads the first line into the string param
//... continue to input into each variable
//... and then when all done
close input
我认为这就是您要的。