%include "io64.inc"section .textglobal mainmain: mov rbp, rsp; for correct debugging ;write your code here ;1~100사이 값중 홀수면 1 짝수면 0출력 GET_DEC 1, a mov bl, 1 and [a], bl cmp [a], byte 1 je LABEL_EQUAL PRINT_DEC 1, 0 jmp LABEL_NOT_EQUALLABEL_EQUAL: PRINT_DEC 1, 1 LABEL_NOT_EQUAL: xor rax, rax retsection .bss g resb 10 ; 변수이름 크기 개 a resb 1SASM 프로그램..
#include "pch.h"#include "Logger.h"LogPrintf::LogPrintf() { printf("* Log create : printf log mode\n");}void LogPrintf::log(const WCHAR* logStr) { printf("%ws", logStr);}//------------------------------------------------------------------------------------------//LogFile::LogFile(xml_t* config) { xmlNode_t* root = config->FirstChildElement("App")->FirstChildElement("Log"); xmlNode_t* elem = root..
#pragma once#include #include "pch.h"//string 초기화#define UNDEFINE_NAME L"Undefine_Name" // wchar_t타입 wide_char//snprintf 재정의, 안전을 위해 array 사용을 기본으로 합니다.#define snprintf(dst, format, ...) _snprinf_s(dst.data(), dst.size(), _TRUNCATE, format, __VA_ARGS__) // __VA_ARGS__ = 가변인자 ...이랑 같이 쓰임 (매크로에서만 쓰임)#define snwprintf(dst, format, ...) _snwprintf_s(dst.data(), dst.size(), _TRUNCATE, format..
#include class A {private:public:int a = 5;};std::ostream& operator전역 연산자 오버로딩은 ostream같이 c++표준이라서 구현할 수 없을 때 사용하는 것으로 위와 같이std::ostream& operator그럼 std::cout 그럼 거꾸로 std::ostream& operator #include int main (){ wchar_t sentence [] = L"Michael is 10 years old"; wchar_t str [20]; char str1[20]; int i; swscanf(sentence, L"%ls %*ls %d", str, &i); wprintf (L"%ls -> %d\n",str,i); return 0;}wcha..