opening file

can we open a file in c++ using a variable(either character or int)?
please tell the syntax if that can be done.
thanks.
Topic archived. No new replies allowed.