아삭

  • 홈
  • 태그
  • 방명록

C 3

[C++] 입출력 속도 개선

#include using namespace std;int main(void) { cin.tie(NULL); ios_base::sync_with_stdio(false); cin >> "입력내용"; cout  ios_base::sync_with_stdio(false);표준 stream의 동기화를 비활성화 (C스타일의 입출력(printf,scanf)와 C++의 입출력(cin,cout) 혼용 불가cin.tie(null)입출력의 연결을 중단 (cin.tie(nullptr) 또는 cin.tie(0)과 동일) (입력 순서 보장 X)

C 2024.10.27

[C++] 시간 측정하기

ctime을 include 해주고 다음과 같이 코드를 삽입해주면 된다.#include int main(void) { clock_t start, finish; double duration; // 시작 start = clock(); // 끝 finish = clock(); duration = (double)(finish - start) / CLOCKS_PER_SEC; cout

C 2024.10.27

switch case 문법

switch ( fruits ){    case 'banana':    case 'strawberry':    case 'apple':        printf("과일입니다");        break;                         // break문을 안쓰면 일치한 시점부터 다음 case문이 실햄됨    case 'cabgage':          printf("야채입니다");        break;}

C 2024.06.03
이전
1
다음
더보기
250x250
프로필사진

아삭

  • 분류 전체보기 (164) N
    • Git (11)
    • Python (35)
    • JavaScript (4) N
    • Java (43)
    • C (3)
    • Linux (7)
    • SQL (18)
    • 데이터베이스 (15)
    • Algorithm (9)
    • 컴퓨터 지식 (15) N
    • React (1) N

Tag

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/06   »
일 월 화 수 목 금 토
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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바