
关于C++问题---IO流
不知?会出现Cannotcompilethefile'f:\test\222.h';nocompiletoolisassociatedwiththefileextensi...
不知?会出现
Cannot compile the file 'f:\test\222.h';no compile tool is associated with the file extension.
请高手指教
#include <iostream.h>
#include <fstream.h>
#include <stdlib.h>
void main()
{ fstream outfile;
outfile.open("f2.dat",ios::out);
if (! outfile)
{cout<<"f2.dat can't open.\n";
abort();
}
outfile<<"this is a program.\n";
outfile<<"this is a program.\n";
outfile.close();
} 展开
Cannot compile the file 'f:\test\222.h';no compile tool is associated with the file extension.
请高手指教
#include <iostream.h>
#include <fstream.h>
#include <stdlib.h>
void main()
{ fstream outfile;
outfile.open("f2.dat",ios::out);
if (! outfile)
{cout<<"f2.dat can't open.\n";
abort();
}
outfile<<"this is a program.\n";
outfile<<"this is a program.\n";
outfile.close();
} 展开
2个回答
展开全部
程序编译应当无语法错误。
编译时,你的源程序名字用错了。
打成 'f:\test\222.h' 了,是吧。
源程序的扩展名应当是 .cpp
"Cannot compile the file 'f:\test\222.h';no compile tool is associated with the file extension." [无法编译'f:\test\222.h',因为没有编译工具与此扩展名对应]
编译时,你的源程序名字用错了。
打成 'f:\test\222.h' 了,是吧。
源程序的扩展名应当是 .cpp
"Cannot compile the file 'f:\test\222.h';no compile tool is associated with the file extension." [无法编译'f:\test\222.h',因为没有编译工具与此扩展名对应]

2023-06-12 广告
STM32F103是一款高性能的嵌入式芯片,由意法半导体(STMicroelectronics)公司生产。它是STM32系列芯片之一,具有紧凑、低功耗、高性能等特点,被广泛应用于嵌入式系统中。STM32F103的主要特点包括:1. 集成了A...
点击进入详情页
本回答由意法半导体(中国)投资有限公司提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询