I commonly use this approach and I find the quickest and cleanest approach is:
g++ $(<args.txt)
Or in the questions exact framing:
g++ $(<file_containing_content) -o executable