How To Use ifstream To Read Files | C++ Tutorial

  Рет қаралды 13,423

Portfolio Courses

Portfolio Courses

Күн бұрын

Пікірлер: 19
@dastin7276
@dastin7276 Жыл бұрын
You are clearly an excellent teacher. Concise, orderly, clear, easy to understand expressions with a good affect. Thank You.
@PortfolioCourses
@PortfolioCourses Жыл бұрын
You're welcome, I'm glad to hear you enjoyed the teaching style! :-)
@preoalex8298
@preoalex8298 Жыл бұрын
No tutorial made me undertand this so easy. Thank you so much.
@PortfolioCourses
@PortfolioCourses Жыл бұрын
You're very welcome Preo, I'm glad you enjoyed it! :-)
@hopedonglo3012
@hopedonglo3012 2 жыл бұрын
Thanks for the excellent work!!!
@PortfolioCourses
@PortfolioCourses 2 жыл бұрын
You're welcome! :-D
@zoxemo3838
@zoxemo3838 2 жыл бұрын
useful video thx man waiting for more of this content
@PortfolioCourses
@PortfolioCourses 2 жыл бұрын
Thank you! We have a playlist of C++ tutorials here that you might enjoy: kzbin.info/aero/PLA1FTfKBAEX6BdpNaWp2uw-YspHwY7qwW
@zoxemo3838
@zoxemo3838 2 жыл бұрын
Aw man that's awesome i will check them all thanks 👍
@PortfolioCourses
@PortfolioCourses 2 жыл бұрын
@@zoxemo3838 You're welcome! :-D
@stepsvideos
@stepsvideos Жыл бұрын
It looks easy, but I can't get it to work. I'm using visual studio 2008 express edition, on windows 7. I have tried putting the file.txt in every directory of the project and the program always prints out "Error opening file". I also tried making an executable, and put the file.txt in the same directory as the executable, but it still did not work. Any thoughts?
@PortfolioCourses
@PortfolioCourses Жыл бұрын
When the project gets built and executed, there is usually some "working directory" that can be configured and changed. It's that working directory where the file would be expected to be. I found this link on changing the working directory: stackoverflow.com/questions/3079128/changing-the-debugging-working-directory-globally-not-per-user-in-vs2008. I would think by default, it would be something like bin/Default or bin/Release or something similar to that. Hopefully this helps! :-)
@stepsvideos
@stepsvideos Жыл бұрын
@@PortfolioCourses Thanks for your reply. At stack exchange I found some code that will 'cout' the current directory, including the program file's name. My file.txt is in that directory. However, the path includes "Visual Studio 2008", which has spaces in it. I will now move the program executable to a folder whose path has no spaces in it, and see if that makes a difference. Thanks again.
@besnergreen
@besnergreen 11 ай бұрын
c# and visual studio make this so easy. Losing my mind trying to make this shit work in c++ ahaha
@FrostGamingHype
@FrostGamingHype 2 жыл бұрын
sir i wanted to ask that how can i read the line that user wants and the line to end example in void(string file_name,int startline,int endline,int color); like this startline from which line endline till that line
@PortfolioCourses
@PortfolioCourses 2 жыл бұрын
OK, that's a good idea for a video, I will add it to the list. What is "color" supposed to do?
@cathlenejaneramboyongbscs-8522
@cathlenejaneramboyongbscs-8522 2 жыл бұрын
where do i program this, it's not woking in onlinegdb
@PortfolioCourses
@PortfolioCourses 2 жыл бұрын
I was able to get it to work on onlinegdb by creating a new file called file.txt. Here is a link to the code and file: onlinegdb.com/dscXwl9cR. 🙂
Class Variables (i.e. "Static Member Variables") | C++ Tutorial
7:06
Portfolio Courses
Рет қаралды 8 М.
Wait for the last one 🤣🤣 #shorts #minecraft
00:28
Cosmo Guy
Рет қаралды 26 МЛН
Hoodie gets wicked makeover! 😲
00:47
Justin Flom
Рет қаралды 34 МЛН
这是自救的好办法 #路飞#海贼王
00:43
路飞与唐舞桐
Рет қаралды 115 МЛН
Member Initializer Lists | C++ Tutorial
23:10
Portfolio Courses
Рет қаралды 9 М.
Using ofstream To Write To Files | C++ Tutorial
5:11
Portfolio Courses
Рет қаралды 7 М.
Reference Variables | C++ Tutorial
12:04
Portfolio Courses
Рет қаралды 4,6 М.
Define A Copy Constructor To Create A Deep Copy Of An Object | C++ Tutorial
17:06
Public And Private Access Specifiers | C++ Tutorial
8:49
Portfolio Courses
Рет қаралды 43 М.
Destructor Basics | C++ Tutorial
9:13
Portfolio Courses
Рет қаралды 21 М.
How To Implement Method Chaining | C++ Tutorial
6:20
Portfolio Courses
Рет қаралды 4,1 М.
Abstract Classes And Pure Virtual Functions | C++ Tutorial
11:05
Portfolio Courses
Рет қаралды 16 М.
Wait for the last one 🤣🤣 #shorts #minecraft
00:28
Cosmo Guy
Рет қаралды 26 МЛН