Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 매크로
- 헤드폰 스피커 자동 전환
- 사전
- XL2430T
- CFG70
- 삼성 게이밍 모니터
- headset switch
- 게이밍 모니터
- overwatch
- AHK
- switch speaker headset
- 오버워치
- nircmd
- 모니터 개봉기
- 모니터 비교
- 모니터 암
- MSA14
- change speaker headset
- Lingoes
- 유틸리티
- 인풋렉 측정
Archives
- Today
- Total
깐우의 세상 만들기
(C++) 텍스트 파일 이름 바꿔 주는 함수 본문
http://www.cplusplus.com/reference/clibrary/cstdio/rename/
#include <stdio.h>
//파일 불러올 이름
sprintf_s(filename,"new_loss%d_bl_%d_length_2500_%d",
PLR,burst_length,pattern_number);
sprintf_s(out_filename,"%d",output_file_number);
//소스 파일 연다
fin.open(filename,ios::binary);
if(fin.is_open()==true)
{
fin.close();
result=rename(filename,out_filename);
if ( result == 0 )
cout<<"success"<<endl;
else
cout<<"fail"<<endl;
}
else
{
cout<<"There is no such file"<<endl;
'Book / Study' 카테고리의 다른 글
아이튠즈로 아이폰 아이패드 동시에 사용하기 (0) | 2011.10.03 |
---|---|
아이튠즈 백업 폴더 바꾸기 (0) | 2011.10.03 |
(C++) 폴더 및 파일 생성(복사) 하는 방법 (0) | 2011.07.29 |
(C++) 텍스트 파일 누적 시키기(파일입출력) (0) | 2011.07.26 |
(C++) 해당 파일 존재시 다음 번호의 파일 생성하기(파일입출력) (0) | 2011.07.26 |