首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
若磁盘上已存在某个文本文件,其全路径文件名为d:\ncre\test.txt,下列语句中不能打开该文件的是
若磁盘上已存在某个文本文件,其全路径文件名为d:\ncre\test.txt,下列语句中不能打开该文件的是
admin
2013-05-30
25
问题
若磁盘上已存在某个文本文件,其全路径文件名为d:\ncre\test.txt,下列语句中不能打开该文件的是
选项
A、ifstream file("d:\ncre\test.txt");
B、ifstream file("d:\\ncre\\test.txt");
C、ifstream file;file.open("d:\\ncre\\test.txt");
D、ifstream*pFile=new ifstream("d:\\ncre\\test.txt");
答案
A
解析
文件流的打开路径用“\\”隔开,而不是“\”,但可以用“/”隔开。
转载请注明原文地址:https://kaotiyun.com/show/yGNp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
以下程序输出结果是______。#include<iostream.h>voidfun(intx,inty,intz){z=x+y;}voidmain(){inta=10;fun(2
一个函数功能不太复杂,但要求被频繁调用,选用______。
关于数据库系统的特点,下列说法中错误的是数据______。
阅读以下程序:#include<iostream.h>voidmain(){staticinta[][3]={9,7,5,3,1,2,4,6,8};inti,j,s1=0,s2=0;for(i=0;i<3;i++)for
若有以下定义:chars(10)="program",t[]="test";则下列选项中对字符串操作错误的是()。
结构化程序设计的主要特征是()。
能表示a≥10或者a≤0的关系表达式是______。
支持数据库各种操作的软件系统叫做()。
随机试题
测定黄酒中的氨基酸态氮时,加入甲醛之后的滴定终点为()。
腹部体检时振水音阳性见于
下列因素与导致妇女疾病无关的为
某木器厂房,共2层,采用木屋顶和砖墙组成的砖木结构,耐火等级三级,每层划分为一个防火分区,建筑面积均为4000m2,共设置四部不靠外墙且疏散楼梯净宽度均为1.10m的防烟楼梯间。该厂房总平面布局及周边厂房、仓库等的相关信息如下图所示。该厂房首层东侧设有建筑
中国证监会采取证券市场禁人措施前,应当告知当事人采取证券市场禁人措施的事实、理由及依据,并告知当事人有陈述、申辩和要求举行听证的权利。()
在集团架构中,母公司董事会对整个集团范围公司治理的稳健性负总体责任。()
有关劳动合同解除程序的规定包括()。
关于承揽合同,下列说法中,符合合同法规定的有()。
(2017年济宁汶上)顿悟是()学习理论的观点。
在数据管理技术发展的三个阶段中,数据共享最好的是
最新回复
(
0
)