Skip to content

Latest commit

 

History

History
38 lines (35 loc) · 707 Bytes

compile.md

File metadata and controls

38 lines (35 loc) · 707 Bytes

คอมไพล์ C++

การคอมไพล์โปรแกรม ประกอบด้วย 3 อย่าง

  1. Preprocess
  2. Compiler
  3. Linker

include

  • ไลบรารี C++
#include <iostream>
  • ไลบรารี C
#include <cstdio>
  • ฟังก์ชันสร้างเอง
#include "mehaeder.h"

define

#define MAX 10
#define CALL call()

ifndef

  • การใช้ ifndef เพื่อป้องกัน #include ไฟล์ซ้ำซ้อน
//Haeder Guard
#ifndef ME_H
#define ME_H
//....
#endif