I like how in a lot of your videos you say something like "This is a bit difficult to explain but I will try my best" ,and then go on to do a perfect explanation of the particular subject and make it a super easy to understand.
@@dhruvdonsahu9972 Ah man I'm glad to hear that, and that is exactly what I wanted to happen with my comments! I've been meaning to check out some of Caleb's videos again, so maybe I'll do that this week and leave some more...
If anyone is getting an error that reads, "Vector is not a member of std", you'll need to add #include to your std list above. (ex. #include #include ). I'm using CodeBlocks. Let me know if this helps anyone!
p/s: for anyone who often forget the name of the lib. You can #include. This works fine in vscode and codeblock but not in Micro Visual Studio(bcuz it is not the standard library)
hello that is awesome i am learning to code and c++ is my base language i ve choosen. How can do like this and encode and decode what i am storing in the file.txt? please i am learning so i really dont know how to do that :) thx
I am trying to do this and getting a "'file' was not declared in this scope; did you mean fileno" message, is anyone else getting this, if so, any idea what the fix would be?
i need to take the output of a void function and write it to a file, except I can't find ANYONE who explains what else you can write to a text file other than simple strings.
If you're using visual studio 2019, you can do this: #include #include using namespace std; int main() { ofstream writer("file.txt"); if (writer.is_open()) { int birds = 4; writer
I get the bad practice thing, because than you'll have every keyword from std be an active keyword, and that can be a problem in ways, but I have to agree that having to std:: on common used keywords, like cout and cin all the time, is messy and inefficient. So my solution is a compromise; for the std:: things that I'm using constantly, I went ahead and gave them "using std::cout;", "using std::cin;","using std::string;"... And I'm going to add "using std::vector;" too, because my app will be using a lot of vectors. My code is clean and easy to read this way, and I personally think it's actually a better practice than the so called "best practice" of having to prefix std:: everywhere in your code for such common things, provided you're only doing it for the things that you use a lot.
@@roberthoople That seems like an okay way to do it, though I think it depends on what we are trying to do and with what resources. I asked my next CS professor and he said that putting std on everything is a waste of time. I don't think using namespace std is the same as say calling and entire library and only needing one function.
I know that is a tutorial for beginners. Maybe would be useful to write who is the target audience. But bigger problem for me is that you teach bad programming practices. Iterate a vector and create copy every iteration?
I know that is a tutorial for beginners. Maybe would be useful to write who is the target audience. But bigger problem for me is that you teach bad programming practices. Iterate a vector and create copy every iteration?
I like how in a lot of your videos you say something like "This is a bit difficult to explain but I will try my best" ,and then go on to do a perfect explanation of the particular subject and make it a super easy to understand.
Every time I hear "our sponsor" its put a big smile on my face, coz it's too CUTE!
This video is shockingly simple and well spoken!
Annnnnd that's my 20 for the day. 2 more days and I'll have gone through them all. If we're not friends by the end of this journey.. I'll be sad
See you tomorrow!
I feel you, i practice c++ for 6 hours + every day, Reading,Watching,Writing,Testing all of the above just because i want too.
@Rudy Makai Ngl but that's creepy af.
I'm your friend, and I've enjoyed seeing a few booms along the way!
Caleb, any chance you are down to make like a advanced version or intermidiate version of this series so when we done we can learn even more.
yeah, I would like that too
Hopefully in the future Caleb you will do the Visual Studio version for this as I don’t know how to use Visual Studio Code.
For Windows, right-click the file and select “Properties”. Then check the “Read-Only” box.
thn x
Ofstream? More like off the chain, because this tutorial is unbelievably amazing!
go ahead and log off
@@keijuanwhite3538 Why? Sometimes people think these types of comments are funny, and it's led to some cool conversations along the way.
@@PunmasterSTP dw about him man, i am having fun reading all of your comments throughout the playlisttt....
@@dhruvdonsahu9972 Ah man I'm glad to hear that, and that is exactly what I wanted to happen with my comments! I've been meaning to check out some of Caleb's videos again, so maybe I'll do that this week and leave some more...
@@PunmasterSTP ohh okii mann ,all the best brother, I am currently on 62nd video , I hope everything goes well , you are an amazing guy brother 🙃
its a marvellous series for me and all thanks to my favourite sir caleb curry
Ending music is a stressbuster
Really good video! Thank you so much.
This video is happiness. :) :)
absolute legend. Cheers.
You are UN GROSO, gracias makia
Question, just to clear up what would std:: ofstream outFile mean?
great video man. thank you 👍👍
For some reason, I needed to use std::fstream::out to create the file, at least for the first time.
I have a question why is c_str() used with in 9:04 is it important or can we not use it
if I wanted to make a file in a specific folder, like the desktop, how would i go around that?
If anyone is getting an error that reads, "Vector is not a member of std", you'll need to add #include to your std list above. (ex. #include #include ).
I'm using CodeBlocks. Let me know if this helps anyone!
p/s: for anyone who often forget the name of the lib. You can #include. This works fine in vscode and codeblock but not in Micro Visual Studio(bcuz it is not the standard library)
This is getting good....
hello that is awesome i am learning to code and c++ is my base language i ve choosen. How can do like this and encode and decode what i am storing in the file.txt? please i am learning so i really dont know how to do that :) thx
how do you write to a specific line? thank you.
whats the name of your theme?
I am trying to do this and getting a "'file' was not declared in this scope; did you mean fileno" message, is anyone else getting this, if so, any idea what the fix would be?
i need to take the output of a void function and write it to a file, except I can't find ANYONE who explains what else you can write to a text file other than simple strings.
If you're using visual studio 2019, you can do this:
#include
#include
using namespace std;
int main()
{
ofstream writer("file.txt");
if (writer.is_open())
{
int birds = 4;
writer
KEEP UPLOADINGGGGGG
Great Tut.
Only fault is LIGHT THEME !!!! 😫
whats wrong with that? dark theme is not gonna make you a god of coding
@@howepellin Dark theme is a lot easier for the eyes than a light theme. What made you think dark theme was going to make someone a better coder, lol?
Then why is it that most of them see it is a mistake or the programmer's fault just because a person prefers light mode?
If we want to save user entered data
using namespace std; ?
And people say C++ is harder than Java!
imagine writing using namespace std on the 3rd line instead of having to type std::whatever before everything
Anyone else think Caleb sounds a lot like Seth Green?
Cant name it jellybean , that one is taken.
please use dark mode!!!
Yes plz. Save our eyes
What is this ide
visual studio code
Haha I wondered the same thing. You never see anyone use light mode
Why don't you just use " Using namespace std;" so you don't have to type std:: on every line.
Edit:
Also why didn't you have to put #include string ?
because using namespace std; is bad practice
@@tootaashraf1
example? Its what my professors teach its literally used on almost every video except this one.
@@jamesstark4136 there's nothing wrong with using namespace std;. It's just bad practice.
I get the bad practice thing, because than you'll have every keyword from std be an active keyword, and that can be a problem in ways, but I have to agree that having to std:: on common used keywords, like cout and cin all the time, is messy and inefficient.
So my solution is a compromise; for the std:: things that I'm using constantly, I went ahead and gave them "using std::cout;", "using std::cin;","using std::string;"... And I'm going to add "using std::vector;" too, because my app will be using a lot of vectors.
My code is clean and easy to read this way, and I personally think it's actually a better practice than the so called "best practice" of having to prefix std:: everywhere in your code for such common things, provided you're only doing it for the things that you use a lot.
@@roberthoople That seems like an okay way to do it, though I think it depends on what we are trying to do and with what resources. I asked my next CS professor and he said that putting std on everything is a waste of time. I don't think using namespace std is the same as say calling and entire library and only needing one function.
I know that is a tutorial for beginners. Maybe would be useful to write who is the target audience. But bigger problem for me is that you teach bad programming practices. Iterate a vector and create copy every iteration?
he explained it in the previous videos.
This isn't same as whate we are tought in lithuania. on yt it's either arabs with hard accent or americanns with useless teatchings
Your video is quite "Curry-ed".
Sorry I saw your last name and I really wanted to make this joke
I know that is a tutorial for beginners. Maybe would be useful to write who is the target audience. But bigger problem for me is that you teach bad programming practices. Iterate a vector and create copy every iteration?