Visual studio如何同时注释多行
完成注释:首先用鼠标选中多行,然后先按Ctrl+k,再按下Ctrl+c
取消注释:首先用鼠标选中多行,然后先按Ctrl+k,再按下Ctrl+u
#include <iostream>
#include <fstream>
#include<string>
using namespace std;
//将int转为string类型,后可以操作。
int main(){
ofstream File;
for(int i=0;i<100;i++)
{
string bb="";
bb=to_string(static_cast<long long>(i));
File.open("file_"+bb+".txt");
File.close();
}
return 0;
}
转:C++文件读写详解(ofstream,ifstream,fstream)