Dab tsi yog headers hauv C?
Dab tsi yog headers hauv C?

Video: Dab tsi yog headers hauv C?

Video: Dab tsi yog headers hauv C?
Video: Leela Xiong |Dab Tsi Yog Koj Tu Npau Suav| 2024, Kaum ib hlis
Anonim

Kev cuam tshuam: C ++

Ntxiv mus, dab tsi yuav tsum yog nyob rau hauv cov ntaub ntawv C header?

A header ntaub ntawv yog a ntaub ntawv muaj C Cov lus tshaj tawm thiab cov ntsiab lus macro (saib Macros) kom sib koom ntawm ntau qhov chaw cov ntaub ntawv . Koj thov kom siv a header ntaub ntawv hauv koj qhov program los ntawm kev suav nrog nws, nrog rau C preprocessing cov lus qhia ' #include '. Header cov ntaub ntawv ua ob lub hom phiaj.

Qhov thib ob, # suav nrog txhais li cas hauv C? # suav nrog yog preprocessor cov lus qhia rau C hom lus uas theej cov cai los ntawm cov ntaub ntawv thov mus rau cov ntaub ntawv muab ua ntej muab tso ua ke. Yog li # suav nrog luam tag nrho cov ntsiab lus ntawm stdio. h rau koj qhov program ua ntej koj qhov kev pab cuam ncav cuag lub compiler.

Hauv qhov no, pes tsawg cov ntaub ntawv header muaj nyob hauv C?

19 header files

Hom ntaub ntawv header yog dab tsi?

Muaj ob hom ntaub ntawv header : cov cov ntaub ntawv uas tus tsim tawm sau thiab cov ntaub ntawv uas tuaj nrog koj compiler. Thaum peb suav nrog a header ntaub ntawv nyob rau hauv ib qhov kev pab cuam, uas txhais tau tias peb luam cov ntsiab lus ntawm lub header ntaub ntawv . Header cov ntaub ntawv suav nrog cov ntaub ntawv hom Cov lus txhais, kev ua haujlwm prototypes, thiab C preprocessor commands.

Pom zoo: