Amazing. I've been beating my head against my desk for the past half hour trying to figure out why my program wasn't running even at all. I decide to click on Bucky's tutorials, as I have done many times, and before the video even started, I had my answer. The education system truly amazes me.
Yes!! This video helped me out soooo much!!! Thank you from the bottom of my heart. You explained the concept of the getline function successfully. I just debugged a programming issue that I was struggling to solve for an assignment. Debugging is such an important skill in programming, especially for jobs. It is such a great feeling when you debug without anyone standing beside you!! Keep up the great vids and info!!!
An important note is there is no difference between a string of characters in C++ and in C. It's just that C++ has a string class with many very nice functions to help you easily handle them, but when it boils right down to it. A string is an array of characters, and the reason why they are more difficult to handle than integers or doubles etc... is that computers only deal with numbers. Period. Characters and strings are stored in your system as an array of numbers. Now in C and C++ you can define a *char* type, which is similar to an *int*, no problem, because a *char* is simply a byte sized (0-255 when it is unsigned) number. A string is an array of these characters and in C++ the string class has a slew of very helpful functions etc... to help you better deal with them. I say all t his because someone referred to outputting a c_str() in the last video as a "relic of C" which it is not, there is no difference in how an array of characters in stored in C and in C++ in memory. It's all just numbers in the end.
One thing that might be worth mentioning, rather than following all of this word for word and re-using cin for each example, if you don't want to comment out cin, do the following.. it'll clear the user input and allow you to take in new characters entered by the user. With c++ you need to clear the cin method before you can use it again in a working program... std::cin >> bucky; std::cout
I got a job at google after watching your tutorials! And I'm only 12! I now know twenty different languages .. And I'm just 12. Still crapping my britches... And working at google.
Nice nice videos bucky. I also have a question. Why the combination of cin >> bucky1 and getline(cin, bucky2) is kind of tight together on this piece of code below? #include #include //allow you to use string functions using namespace std; int main(){ string bucky1; cin >> bucky1; cout
If you've used a library function that you haven't declared, your compiler implicitly does it....accompanied with a lil warning at times. Hope this helped.
Salim Ahmed Ali Actually, it's because the header includes some functions and objects from the header for its own class and function template code and et cetera. It's still better to include explicitly, however.
Sometimes headers are included in other headers. In this case, it's probably included in iostream somewhere. However, you cannot count on this behaviour. You should include what you need.
Hi, what about if i wanna do string function that tells me if the password is valid or not for example the password should have at least 8 characters and and the password should consists of only letters and digits and the password should contain at least 2 two digits?? Please help cuz I'm so confused Best regards
I wanted to create an output file that contains spaces i.e. (John W. Smith) and be able to read that file along with other data types (John W. Smith 54 Gun Owner ...). I tried using getline() but it only worked for the first entry inside of my while loop. Any help that you guys can give me would be GREAT !
I dont know if its just my computer acting weird or what but there is something weird with the getline function...someone please explain this: code: (i have all the headers needed) string name; cin >> name; cout
***** try it in this order : it works for me :D #include #include//gives string functions using namespace std; int main() { string line; getline(cin, line); cout
***** FROM MY OWN UNDERSTANDING OF WHATS HAPPENING, WHEN YOU ENTER THE VALUE OF THE FIRST STRING VARIABLE, THE COMPILER IS GOIING TO READ AND STOP @ THE FIRST WHITE SPACE AND ANY WORD COMING AFTER THE COMPILER IS GOING TO ASSIGN (by assuming) IT TO THE getlin() for example::::: #include #include//gives string functions using namespace std; int main() { string name; cin >> name; cout
please! How can i replace a char in a string with some kind of variable? example: "my name is Gil" i want to print "m* nam* i* gi*"------can you help replace?resize?
legend has it that the milkshake is still stuck in his throat.
*10 years passes * : .. um sorry guys i still have that milkshake stuck in my throat
Your videos are the best C++ tutorials on youtube!
No u
10 years old yet the sound quality is better than alot of tutorials in 2021😂😂
I've concluded that Bucky is sponsored by McDonald's
lol soo true
He is helping them to hack kfc
Amazing. I've been beating my head against my desk for the past half hour trying to figure out why my program wasn't running even at all. I decide to click on Bucky's tutorials, as I have done many times, and before the video even started, I had my answer. The education system truly amazes me.
you've been beating your meat against your desk for the past half hour? damn dude.
what
8:10 thats something i never thought id hear a youtuber say; thats why we love you bucky
I love how he mistypes.
bcuky, my hampster thinks tuna sandichwedhd dare good. Thank you.
Lol..... you got it bro...
Yes!! This video helped me out soooo much!!! Thank you from the bottom of my heart. You explained the concept of the getline function successfully. I just debugged a programming issue that I was struggling to solve for an assignment. Debugging is such an important skill in programming, especially for jobs. It is such a great feeling when you debug without anyone standing beside you!! Keep up the great vids and info!!!
I got a 100 on my computer science test because you. Thank you so much!
Bucky I love how much better at teaching you are than my college prof X'D
I just wanna thank you for all your videos!! Without them, I'd have no clue how to do C++. Keep them coming!
You can also print a character from a string just as you would do with an array. For example:
string myString = "Hello World!";
cout
Bucky I bless you with my whole soul!! Man is a saviour
20/10 more video's to go! (You was nearly correct, just missed that /10, but hey, no problem!)
Thanks Bucky!! This is very useful to me!! God bless you!
It’s 2022 and it’s 11years ago tutorials helping me today ❤
An important note is there is no difference between a string of characters in C++ and in C. It's just that C++ has a string class with many very nice functions to help you easily handle them, but when it boils right down to it. A string is an array of characters, and the reason why they are more difficult to handle than integers or doubles etc... is that computers only deal with numbers. Period. Characters and strings are stored in your system as an array of numbers. Now in C and C++ you can define a *char* type, which is similar to an *int*, no problem, because a *char* is simply a byte sized (0-255 when it is unsigned) number. A string is an array of these characters and in C++ the string class has a slew of very helpful functions etc... to help you better deal with them. I say all t his because someone referred to outputting a c_str() in the last video as a "relic of C" which it is not, there is no difference in how an array of characters in stored in C and in C++ in memory. It's all just numbers in the end.
Hi. Im from argentina. You video helps me to resolve an exercise. Gracias!
you helped me get through high school and college
u explained that so easily wow
Mmmmm..........the man of the globe,programmer.Bucky,keep it in
Guys. do #include (if on windows obviously)
And in the for loop. write after the _cout_ function:
Sleep(50);
You're welcome
Has anyone ever told you that you are a life saver?
Great video Tutorial Bucky, it really helped me understands C++. Thank you!
thanks for your success bro i am blessed! your tutorial truly helped me with my C++ homework
Your video is very old but you teach good than new
One thing that might be worth mentioning, rather than following all of this word for word and re-using cin for each example, if you don't want to comment out cin, do the following.. it'll clear the user input and allow you to take in new characters entered by the user. With c++ you need to clear the cin method before you can use it again in a working program...
std::cin >> bucky;
std::cout
this should of literally been in his first ten tutorial vids rather then last XD
Wow, you post so many vids!!! You are awesomeness!
Thank you very much bucky.. this video on strings was very very very usefull it helped me out a lot.
I got a job at google after watching your tutorials! And I'm only 12! I now know twenty different languages .. And I'm just 12. Still crapping my britches... And working at google.
+Christopher Jones This seems...very legit xD
+Christopher Jones
And I'm just 12
that's possible if your mother/father is adopted
WELL SEEMS LEGIT JUST AS LEGIT AS UR PROFILE PIC MUST BE A PIC OF UR DAD
Do you celebrate your birthday on 29th Feb?
I've determined that you do not know how to spell sandwich.
tuna sandwichwedhd hahahahahah XDXDXD!!!!!
santghitwch?
youh do'nt xcare
Your explaining is just super!
i love to hear for always your beautiful SENTENCE (what is going on guys)
I've been eating tuna sandwiches just over the last week. It only just occurred to me this weekend that it's Bucky's fault
Thank you for this! helped me out a lot :D and i like ur voice btw
You just got tuna sandichwed in high definition, son!
oh my god this helped so MUCH thanks dude
Really good and understood the concept 🤩🤑
So, what's the difference between string.size() and string.length() ??
You are one AWESOME TEACHER!
Nice nice videos bucky. I also have a question. Why the combination of cin >> bucky1 and getline(cin, bucky2) is kind of tight together on this piece of code below?
#include
#include //allow you to use string functions
using namespace std;
int main(){
string bucky1;
cin >> bucky1;
cout
float omgwtf;
void mcDonalds(haveTuna ,bbqsandmiches)
cin>>milkshake>>endl;
Only "like 20 more videos" to go~
I'm wondering, why would one decide not to use namespace std? Is there any advantage for not using it?
old school
I think its because without it makes the program run faster or something like that.
**TUNA** is the most used term in bucky's life!! :)
Thanks bucky, your tutorials are so helpfull
Thank you so much Sir Bucky!!!
6:06 was he tryna spell "hampster" like that? or was he tryna spell "hamster" like the animal?
Very useful Video,, :) :) :) Love from #Bangladesh..
Finished series.. Where do I go to keep learning more such as struct etc..
I have a few tuts on structs on my channel if you are looking for some info, I don't have much but better than nothing ?
Hi, are you using the codeblocks program?
Because the code is not running or is there something i need to do?
BTW i am a newbie and studying c++
Very nice tutorial! Thanks
Nice tutorial butI have a question, i haven't included the string header file but i can still use the getLine() function... why?
If you've used a library function that you haven't declared, your compiler implicitly does it....accompanied with a lil warning at times. Hope this helped.
Salim Ahmed Ali Actually, it's because the header includes some functions and objects from the header for its own class and function template code and et cetera. It's still better to include explicitly, however.
How to find the documentary of the string class to read about the functions ?
You know that you dont have to use brackets if you only have one statement after the for, while and if, right?
You the man Bucky!!
Sometimes headers are included in other headers. In this case, it's probably included in iostream somewhere. However, you cannot count on this behaviour. You should include what you need.
@Mrjohnchannel thanks mate. Happy new year
Thank you sir, helps a lot.
hi bucky, can you please tell me where I can find good tutorials for STL .I am looking for basic ones not 1000 pages book.
Thanks
thank you! :) i have a question, how do you terminate and exit a program if the same value of cin was entered as input?
usa an if statement
ANY HELP????
i just don't get the drop down as you get
like when you type s3.assign
so thr is no drop down in my codeblocks.. m usind 10.05 version
what kind of IDE and compiler you use under Windows? :)
That milkshake do be thick doe 🤣
Bucky your videos are amazing no doubt but could you make about 130 more of these on various things that aren't covered? :) Thanks
how would I add an array of strings along with a cin in a class?
"woohohooow easy caps lock"
ASHEUASHUEUHSAEUH
his comments are always funny
Do you mean apstring as in the one used in AP exams? They're quite different.
is getline (); a built-in function that can be recognized by c++?
Hi, what about if i wanna do string function that tells me if the password is valid or not for example the password should have at least 8 characters and and the password should consists of only letters and digits and the password should contain at least 2 two digits??
Please help cuz I'm so confused
Best regards
Bro!!!! You rock....
What IDE do you use? Do you have a tutorial on how to install it?
+Mohsin Azmi codeblocks, watch his first video in this series or simply google it
It is a very good tutorial..........!
You teach people in a friendly way... cooll...
i am usig code:: blocks and i didn't include the string class but all the functions worked??
the whole video i was thinking about that Milk Shake he had before XD
I wanted to create an output file that contains spaces i.e. (John W. Smith) and be able to read that file along with other data types (John W. Smith 54 Gun Owner ...). I tried using getline() but it only worked for the first entry inside of my while loop. Any help that you guys can give me would be GREAT !
a string is different than an array of characters in that they have no set length
cant even focused on watching the whole tutorial cos i keep laughing every few seconds bc i was reading the comment first before watching the video
So here I'm after 8 years, thinking that I'm too late. World has already gone through this!
hey there u dont have to worry im a lot more late than you hehe
@General relativity huh yes
I love your shameless typos
plz help me with this :
create a function to accept 2strings and return status whether are identical or not:
kashish gupta
bool functionName( string a, string b) {
if(a == b) {
return true;
else {
return false
}
I dont know if its just my computer acting weird or what but there is something weird with the getline function...someone please explain this:
code: (i have all the headers needed)
string name;
cin >> name;
cout
***** try it in this order : it works for me :D
#include
#include//gives string functions
using namespace std;
int main()
{
string line;
getline(cin, line);
cout
***** FROM MY OWN UNDERSTANDING OF WHATS HAPPENING, WHEN YOU ENTER THE VALUE OF THE FIRST STRING VARIABLE, THE COMPILER IS GOIING TO READ AND STOP @ THE FIRST WHITE SPACE AND ANY WORD COMING AFTER THE COMPILER IS GOING TO ASSIGN (by assuming) IT TO THE getlin() for example:::::
#include
#include//gives string functions
using namespace std;
int main()
{
string name;
cin >> name;
cout
+friendOfTheWinds
I'm more than 2 years late, but for anyone else:
add cin.ignore(); before getline(cin, line); now it will work
Hi
Is there a way to send event to event hub using cpp
How to fix 'was not declared in the scope'
thanks!
How can i replace a char in a string with some kind of variable?
example: "my name is Gil"
i want to print "m* nam* i* gi*"------can you help
Hold on guys! only 2 tutorials left =D
bro, any videos on linked list
please!
How can i replace a char in a string with some kind of variable?
example: "my name is Gil"
i want to print "m* nam* i* gi*"------can you help
replace?resize?
***** string name = "Alin";
name.at(0)= '*';
cout
what is the bucky for?
thanks,from egypt
what do i need if i wanted to implement my own String class ?
electricity, a pc(with OS) , a keyboard(or a mouse), minimum 1 finger, eyes and a brain
Pulver Paul Pulver Paul seems smart😍 dont u think i need you too cause i have everything you've mentioned as well as a condom that u'll like 👌
*insert noice* :D
pff i am using a stick and my mouth to write
hey what about linked list and trees
Is this will wprk in turbo c?
really love yada yada yada......
I came when he coughed
Are u not tired of making 20 tutorials per day Bucky????
he sponsored tuna sandwiches from Mcdonalds in the whole video