C++ सोर्स फ़ाइल (.cpp)
उच्च-प्रदर्शन सिस्टम और ऐप्लिकेशन विकसित करने के लिए उपयोग की जाने वाली प्रोग्रामिंग भाषा। C++ फ़ाइलें गेम इंजन, ऑपरेटिंग सिस्टम और हार्डवेयर-निकट सॉफ्टवेयर में उपयोग की जाती हैं।
MIME Type
text/x-c++src
प्रकार
टेक्स्ट
संपीड़न
दोषरहित
लाभ
- + High performance with zero-cost abstractions
- + Rich standard library (STL) with containers, algorithms, and iterators
- + RAII provides deterministic resource management
- + Templates enable powerful generic programming
हानियाँ
- − Complex language with a very steep learning curve
- − Long compilation times, especially with heavy template use
- − Manual memory management (though smart pointers help)
.CPP कब उपयोग करें
गेम इंजन (Unreal Engine), ऑपरेटिंग सिस्टम, ब्राउज़र इंजन, डेटाबेस (MySQL), रीयल-टाइम सिस्टम और एम्बेडेड सॉफ्टवेयर।
तकनीकी विवरण
C++ सोर्स (.cpp/.cxx/.cc) और हेडर (.h/.hpp) फ़ाइलें कम्पाइलर (GCC, Clang, MSVC) द्वारा ऑब्जेक्ट कोड में कम्पाइल होती हैं। C++ मल्टीपल-इनहेरिटेंस, टेम्प्लेट मेटाप्रोग्रामिंग, RAII, move semantics और zero-cost abstractions को सपोर्ट करता है।
इतिहास
Bjarne Stroustrup ने 1979 में Bell Labs में C++ (मूल रूप से 'C with Classes') विकसित किया। ISO ने 1998 में इसे मानकीकृत किया। C++11 ने auto, lambdas और smart pointers जोड़े। C++20 ने concepts, coroutines और modules पेश किए।