C++

nullptr

Në shqip përdoret i njëjti emër.

ShpjegimiSQ

nullptr është vlera e një pointer-i që s'tregon askund. Nëse përpiqesh ta lexosh (*p) një pointer që është nullptr, programi rrëzohet — prandaj kontrollo gjithmonë para se ta përdorësh.

EnglishEN

nullptr is the value of a pointer that points nowhere. If you try to read through (*p) a pointer that's nullptr, the program crashes — so always check before using it.

Si ta mendosh

Si një adresë bosh në zarf: s'ke ku ta dërgosh letrën; po u nise gjithsesi, humb rrugës.

Lexoje në anglisht

Like a blank address on an envelope: there's nowhere to send the letter; set off anyway and you get lost.

Shembull kodicpp

int* p = nullptr;
if (p != nullptr) {
    std::cout << *p;
}

Terma të lidhur