すでに存在するファイルに書き込む簡単なプログラムを書こうとしています。このエラーが発生します:
hello2.txt: file not recognized: File truncated
collect2: ld returned 1 exit status
私は何が間違っているのですか?(両方の方法でスラッシュを試しましたが、それでも同じエラーが発生します。)
#include<iostream>
#include<fstream>
using namespace std;
int main()
{
ofstream outStream;
outStream.open(hello3.txt);
outStream<<"testing";
outStream.close;
return 0;
}