Skip to main content

Posts

Showing posts with the label Learn

Hello, world!

If you have some experience in programming, you have probably seen this quote uncountable times. The Hello, world! start is always a good start. With such a simple meaning, it can make you learn a lot of useful things about the language you want to learn. We will take C++ as an example. This is the code that makes that beautiful and simple quote to appear on your screen: #include <iostream> using namespace std; int main() {  cout<<"Hello, world!"<<endl;  return 0; } First of all, you will notice the #include <iostream> . From now on, you have to remember to include that library when you want to use the stdout or stdin . Then, we have using namespace std; . Although this line can be omitted, it is way better to include it in our program. Otherwise, we would have to add std:: before every single token calling a function inside the Standard Library, so the fifth line would be: std::cout<<"Hello, world!"<<std::endl; And ...