This is the basic structure of a C++ program. Let's understand step-by-step how to run this using Dev C++.
यह एक साधारण C++ प्रोग्राम है। चलिए इसे Dev C++ के द्वारा step-by-step चलाना सीखते हैं।
.cpp
extension, e.g., first.cpp
.Hello, World!
.cpp
एक्सटेंशन के साथ सेव करें जैसे first.cpp
।Hello, World!
दिखाई देगा।#include <iostream>
using namespace std;
int main() {
cout << "Hello, World!" << endl;
return 0;
}
Hello, World!
#include <iostream>
: Includes the standard input-output stream library for C++.using namespace std;
: Allows us to use standard objects like cout
without prefixing std::
.main()
: Entry point of the program.cout
: Prints text to the screen.return 0;
: Indicates successful execution.#include <iostream>
: यह C++ के लिए standard input-output stream लाइब्रेरी जोड़ता है।using namespace std;
: इससे std::
लिखने की जरूरत नहीं पड़ती।main()
: यह प्रोग्राम का शुरुआत बिंदु है।cout
: स्क्रीन पर output print करता है।return 0;
: सफलतापूर्वक प्रोग्राम खत्म होने का संकेत देता है।