Teach yourself C++ Lesson 1 hello world in detail

preview_player
Показать описание
Today we are going to take a traditional approach to programming and start with what is typically the simplest program to perform in computer programming. The Hello World program has been used since 1972, when it first appeared in Tutorial Introduction to the Language B. It's purpose is to check that a new compiler setup is working correctly, and as a way to teach new users the simplest syntax and program structure needed to get a useful result from your program. C++ was first invented in 1983 at Bell Labs as an enhancement to the already existing C language. C itself was developed between 1969 and 1973. As you've begun to realise both these languages have long histories and are still in active use today remaining among the worlds most popular programming languages.

This tutorial, is going to be split into three sections, the first section, is where we type in the source code, to get a feel for it.

The second part is going to deal with the specific commands of that source code so you get a picture of what is going on.

The third part is going to deal with the inevitable jargon used throughout this tutorial. These will include words like compiler, preprocessor, header files, etc.
Рекомендации по теме
Комментарии
Автор

I'm sure you get these all the time, but I felt like I had to send it. Your video tutorials are great, and I have seen that when people comment with questions you answer them. You both try to explain everything in depth in the videos, and help people through problems in comments. That is absolutely admirable. I am going to post links to your videos just for the simple fact that it seems that you really are out to help people and I really respect that. Take care, and good luck!

Andrew Edwards

andrewedwards
Автор

Please continue this series, I actually learned quite a bit that other people couldn't teach me!

FUNSTUF
Автор

Great video! I am picking up programming as a hobby, and have no formal training in it. This video is extremely helpful, straight forward, and VERY thorough! Can't wait to watch the rest of the C++ videos! You need to come teach at the University of New Mexico!

eigenstateco
Автор

Complete beginner to C++ and to programming in general. Found this video very helpful. Thanks. Subscribed.

chrismac
Автор

Thank you incredibly much for making this tutorial. This was very well done and informative, the best I've been able to come across. I can hardly wait to continue in your tutorial series. Thank you.

drummerdude
Автор

Thank you for the video and the detail that you include in it. I am learning C++ at the local college and find it assums that we all know basic programming. So, this video has been very helpful!!

Gibinna
Автор

thanks!!! ive read about some of the terminology before, but is much easier to understand with you explaining it

johnfromga
Автор

Excellent! Just what i was looking for C++ tutorials using the Code::Blocks IDE.... this way I can tackle 2 birds with one stone... Familiarization with the IDE (which is sweet from my initial experience with it).... and learning C++ ... MORE Code::Blocks stuff!! And PLEASE Get into some OpenGL stuff :) (Keep up the good work)

MrMattsmind
Автор

Awesome tutorial! Exactly what I was looking for. :)

ThatEnglishGuy
Автор

Thank you so much for taking the time to make this I will be definitely subscribing and following along

LizardMods
Автор

It's an old school technology called mono. This means it will only play through a single speaker. As there's only one person talking stereo isn't really needed. At the time my equipment was set to record mono, so mono is what you've got. My later tutorials receive upgraded audio equipment and these play in stereo.

dcforemanuk
Автор

Hey, nice tutorial. I think i was the one sugesting that you shuld make C++ tutorials btw. I got one question: why don't you use microsoft visual C++ studio? I also think you would get more views by using that program :)

-Tim

TimEriksenA
Автор

I noticed that you use 64bit Windows.
How is the performance? Is it really better than 32 bit like they say?
It works better than 32 bit version on multicore CPU?

Thanks for the tutorial. There still isn't enough good tutorials about C++.
So very nice to see another good long tutorial.

I mostly use Pascal but trying to move to C++ as time goes. Because many people use that instead Pascal.

jw
Автор

Click on view select perspectives and click on default perspective.

dcforemanuk
Автор

If it's saying iostream directory invalid then try going to settings, then click on compiler and go to the toolchain executables tab then select auto detect. Hope it helps.

trenvert
Автор

I am a new student to this program and i am having at the point of the going to the build and run and this is what is saying quote "uses an invalid compiler. Probably the toolchain path within the compiler options is not setup correctly?! Skipping...
Nothing to be done." i do not know what to do help me out thank you

nuradinahmed
Автор

Help? "Hello World - default": The compiler's setup (GNU GCC Compiler) is invalid, so Code::Blocks cannot find/run the compiler.
Probably the toolchain path within the compiler options is not setup correctly?!
Goto "Settings->Compiler and debugger...->Global compiler settings->GNU GCC Compiler->Toolchain executables" and fix the compiler's setup.
Skipping...
Nothing to be done (all items are up-to-date).

IronCoreHD
Автор

i have heard putting "using namespacestd " is a bad programming practice because it causes name clashes later on in big files. is that true and can you explain it more please ?

rtabibi
Автор

@AUsernamePliz I use Microsoft Visual Studio with my DarkGDK tutorials, and there's several advantages with code::blocks.

1) Windows, Linux, and Mac users can use code::blocks
2) Code::blocks is completely free and open source
3) I may get into OpenGL and multi-platform coding in the future.
4) I like code::blocks!
5) I always try to support quality open source software.

dcforemanuk
Автор

When you use visual studio you must also put in
#include "stdafx.h"
before the iostream

MasterJkpatrick