Dab tsi yog qhov kov hauv C?
Dab tsi yog qhov kov hauv C?

Video: Dab tsi yog qhov kov hauv C?

Video: Dab tsi yog qhov kov hauv C?
Video: yog hmoov dab tsi. Zoo Xyooj (cover) 2024, Kaum ib hlis
Anonim

A kov yog lub ntsiab lus dav dav rau kev siv (tsis yog C ++ siv) rau ib qho khoom. Hauv cov ntsiab lus, a kov tuaj yeem yog lwm yam uas tsis yog tus taw tes, xws li tus lej ntsuas lossis cov khoom uas muaj cov ntsiab lus ntxiv txog cov khoom (xws li tus taw tes ntse).

Kuj paub, dab tsi yog siv rau?

Hauv computer programming, a kov yog ib qho kev paub daws teeb meem rau cov peev txheej uas yog siv thaum daim ntawv thov software hais txog blocks ntawm lub cim xeeb lossis cov khoom uas tswj hwm los ntawm lwm qhov system zoo li database lossis operating system.

Tom qab ntawd, lo lus nug yog, dab tsi yog qhov tuav hauv C ++ programming? Hauv C++/CLI, a kov yog tus taw tes rau ib yam khoom nyob rau ntawm GC heap. Tsim ib qho khoom ntawm qhov (unmanaged) C++ heap yog ua tiav siv cov tshiab thiab cov txiaj ntsig ntawm cov lus qhia tshiab yog tus taw qhia "ib txwm". Ib qho khoom tswj tau raug faib rau ntawm GC (tswj) heap nrog gcnew qhia. Qhov tshwm sim yuav yog a kov.

Kuj nug, yog tus tuav tus taw tes?

4 Teb. A kov feem ntau yog opaque siv rau ib yam khoom. tuav tuaj yeem tsuas yog siv los ntawm kev ua haujlwm hauv tib lub tsev qiv ntawv interface, uas tuaj yeem rov pib dua kov rov qab mus rau qhov khoom tiag. A taw tes yog kev sib txuas ntawm qhov chaw nyob hauv nco thiab hom khoom uas nyob hauv qhov chaw nco.

Dab tsi yog handles hauv Windows?

Yog lawm, hauv Qhov rai , (thiab feem ntau hauv kev suav) a kov yog ib qho kev paub daws teeb meem uas zais qhov chaw cim xeeb tiag tiag los ntawm tus neeg siv API, tso cai rau lub kaw lus rov teeb tsa lub cev lub cim xeeb pob tshab rau qhov program. Kev daws teeb meem a kov nyob rau hauv ib tug pointer xauv lub cim xeeb, thiab tso lub kov invalidates tus pointer.

Pom zoo: