以下不能正确创建输出文件对象并使其与磁盘文件相关联的语句是
A、ofstream myfile; myfile.open("d:ofile.txt");
B、ofstream *myfile=new ofstream; myfile->open(d:ofile.txt");
C、ofstream myfile.open("d: ofile.txt");
D、ofstream *myfile=new("d:ofile.txt");
【正确答案】:D
以下不能正确创建输出文件对象并使其与磁盘文件相关联的语句是
- 2024-07-27 17:10:58
- C+ + 程序设计(04737)