반응형
c++ 파일 쓰기 예제 코드
저장용
#include <iostream>
#include <fstream>
int main(int argc, const char* argv[])
{
std::ofstream fout;
fout.open("output.txt");
if (!fout.is_open())
std::cout << "file open failed" << std::endl;
fout << "helloworld";
fout.close();
}
반응형
'Programing > C++' 카테고리의 다른 글
IPv4 주소를 확인하는 C++ 정규식 코드 (0) | 2023.05.04 |
---|---|
C vs C++ 의 차이점 (0) | 2023.02.27 |
C++ 커리큘럼 가이드 (0) | 2023.02.26 |
STL Vector를 이용한 DataManger Class 만들기 예제 (0) | 2012.05.30 |
Struct (0) | 2011.02.10 |