목록C,C++ (125)
오답노트
std::fstream rawData; // 읽고 쓸 파일. char* Path = new char[99999]; memset(Path, NULL, sizeof(Path)); printf("경로를 입력해주세요\n"); std::cin >> Path; //scanf_s("%s", Path); rawData.open(Path, /*std::ios::binary |*/ std::ios::out | std::ios::in); // Open할때 바이너리, 읽고 쓰기로. memset(Path, NULL, sizeof(Path)); if (!rawData.is_open()) // 잘 열렸는지 인. 아니면 오류 났다고 해주자 { //MessageBox("File Open Error.(Don't use Korean ti..
int nCnt = 3; //new int** n = new int* [nCnt]; for (int i = 0; i < nCnt; i++) { n[i] = new int[nCnt]; } //delete for (int i = 0; i < nCnt; i++) { delete[] n[i]; } delete[] n;
TRY{ //소스내용 } CATCH_ALL(e){ //TRY에서 받은 Exeption 처리 내용 }END_CATCH_ALL TRY, CATCH_ALL, END_CATCH_ALL 모두 define 되어 있고 그 안에는 try,catch operator 가 사용된다.
char szBuffer[64]; char *pBlockNum = strtok(szRegister,":"); int nBlockNum = atoi(pBlockNum); szBuffer[0] = nBlockNum & 0x00ff; szBuffer[1] = (nBlockNum>>8) & 0x00ff ; // int -> char 두 배열에 나눠서 들어감 ( 상하위비트 나눔) //위처럼 분리시 상하위 비트 바뀜 // 아래처럼 분리시 상하위 비트 그대로 szBuffer[0] = (nBlockNum>>8) & 0x00ff ; szBuffer[1] = nBlockNum & 0x00ff; /* 0x1234 일때 szBuffer[0] = (nBlockNum>>8) & 0x00ff ; // 0x12 szBuffer[1]..