반응형
void CMFCApplication1Dlg::OnBnClickedOk()
{
// TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.
CString strFilePath;
strFilePath = "../LogLogLogLog22222/";
if (GetFileAttributes((LPCTSTR)strFilePath) ==-1)
{
// 디렉토리가 없으면 생성
CreateDirectory(strFilePath, NULL);
}
string line;
std::string str = std::string(CT2CA(strFilePath));
str += "adge.txt";
ofstream file(str);
if (file.is_open()) {
file << "this is second " << endl;
}
CDialogEx::OnOK();
}
반응형
'프로그래밍 _공부자료. > C++ 공부' 카테고리의 다른 글
리눅스 TCP/IP 클라이언트 기본 class 구조 . (0) | 2023.02.11 |
---|---|
리눅스 TCP/IP 클라이언트 기본코드 구조 (0) | 2023.02.11 |
C# 유니티 오디오 컴퍼넌트 만들기. (0) | 2022.01.13 |
유니티 C# 객체 끼리 충돌 할때 뭔가를 하고 싶을때 ??? 필요한 함수 (0) | 2022.01.06 |
c++로 설문조사 프로그램 만들기. (0) | 2021.12.05 |
댓글