Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> C++

บทบาทของ C++ ใน Computer Science

C++ เป็นภาษาโปรแกรมที่พัฒนาโดย Bjarne Stroustrup ในปี 1979 ที่ Bell Labs C++ ถูกมองว่าเป็น middle-level language รวมคุณสมบัติ high-level และ low-level เป็น superset ของ C โปรแกรม C ที่ถูกต้องเกือบทุกตัวเป็น C++ ที่ถูกต้อง C++ รันบนหลาย platform: Windows, Mac OS, UNIX versions

ออกแบบมาเพื่อ system programming และ embedded, resource-constrained และ large systems เน้น performance, efficiency และ flexibility ใช้พัฒนา software infrastructure และ resource-constrained applications รวมถึง desktop apps, servers (e-commerce, web search, SQL servers), และ performance-critical apps (telephone switches, space probes)

C++ ออกแบบเป็น successor ของ C และนำเสนอ concepts ใหม่ใน Computer Science: templates สำหรับ generic programming, RAII (Resource allocation is initialization) และ deterministic destructors ช่วย memory management ดีขึ้น

C++ นำเสนอ user overloadable operators ทำให้ user-defined types ดูเหมือน built-in types รองรับ multiple inheritance ช่วย modeling complex real-life constructs

สุดท้าย C++ เป็นภาษาที่ structured ใกล้เครื่องมาก ใช้งานต่างๆ ที่ต้องการ raw performance ใช้ implement applications ที่จะช้าหรือ unmaintainable หากสร้างด้วยภาษาอื่น เช่น สถาบันการเงินส่วนใหญ่ใช้ C++ สร้าง model financial data เพราะเร็วมาก ยังเป็น level สูงกว่า C แต่ให้ functionality เหมือน C ใช้ใน embedded ได้ บ่อยครั้งใช้พัฒนา game engines, games, desktop apps หลาย AAA title games สร้างด้วย C++