C++ Programming

Derek Banas · 4.8M views · 2014 · 1:10:33

Open on YouTube

C, C++, Rust, Go & systems languagesEducation & learningtutorialdated

Why Stack Overflow recommends it

Stack Overflow users cite it as the tutorial they were following when they hit a compiler error or got confused by a code snippet, such as stoi and stod not being declared or the difference between two string assignments.

Recommended by 0 people across 0 different months, 2014 to 2018.

What it is

A one-hour crash course in C++ by Derek Banas that walks through the language's basics in a single sitting. It covers data types, control flow, strings, vectors, functions, file I/O, pointers, classes, inheritance and polymorphism, with timestamps for each topic.

What people said

Cites MolotovBeaver · 2014-12 · Stack Overflow · on “Difference between these two string assignments”

New to Programming and C++. I was watching a tutorial and the person did this: //method one string wholeName = yourName.assign(yourName); What is the difference from this method and what is more beneficial? //method two string wholeName = yourName; Also, if they have two different implications and reasons for use, what are they? Edit: I saw this method used in this video: [this video]

Cites Speshul · 2015-09 · Stack Overflow · on “ERROR: 'stod was not declared in this scope' code::blocks”

was watching this c++ tutorial on youtube : [this video] (part i'm referring to starts around 20mins in). Was following the video and was wondering why i was getting this error: error: 'stod' was not declared in this scope. Wondering why I'm getting this error here is my code thanks. #include <iostream> #include <vector> #include <string> #include <fstream> #include <cstdlib> using namespace std; int main(){ string yourName; cout << "whats your name? "; getline(cin, yourName); cout<< "hello "<<yourName<<endl; double numberConstant = 0.57721; string numberguess; double numberguessDouble; cout<< "Guess a number between 1 and 10"; numberguessDouble = stod(numberguess); if (numberguessDouble == numbe

Cites Mohsen · 2016-01 · Stack Overflow · on “‘stoi’ was not declared in this scope”

So this error have been addressed several times, but no answers helped me. I'm using Notepad++ and Cygwin on windows 10. My code is as follows and it's from Derek Banas's 1 hour C++ tutorial [this video] : #include <iostream> #include <vector> #include <string> #include <fstream> #include <cstdlib> #include <sstream> //#include <stdlib.h> using namespace std; int main(){ string numberGuessed; int intNumberGuessed = 0; do { cout << "Guess between 1 and 10: "; getline (cin,numberGuessed); intNumberGuessed = stoi(numberGuessed); cout << intNumberGuessed << endl; } while (intNumberGuessed != 4); cout << "You Win" << endl; return 0; } and this is the error I get: $ g++ -std=c++11 -static ctut.cpp ctut

Cites user10336668 · 2018-09 · Stack Overflow · on “What is an initializer in arrays in C++?”

But in this video: [this video] he created the array using the same method and he didn't get any error. Can you tell me how I can create two arrays, from which I can get the first letter of my name and surname?