Read A File And Display Its Contents | C++ Example

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Years ago I was looking for a solution to open a file and change one character write and close the file. No rewriting the entire contents. If I knew the position I could update any size file in a fraction of time. I think this was only because in C it was a one for one character swap. Can you reduce or increase the character count without having to rewrite the entire file in C or C++?

rnarum
Автор

Hello sir, I'm one of your subscriber, i watch all your videos. Can u make a video series on Embedded c++ tutorial...? In YouTube we can find Embedded c but not much on Embedded c++....thanks🙏

ggtechnocracy
Автор

HELLO one question please I found this line in a video = %e", EMPTY_VALUE); and it is a value of etc but what is it for and when to use it, thanks in advance

giovannidonato-izxr
Автор

What do u say about a code to read from a PDF?

datryen
Автор

Hello sir, could you please help me ? why I am getting this output, the string is "Hello" and I am reading it character by character from file but the output iIam getting is Helloo. I don't know why it is printing one extra 'o' in the end.
Here is the code:
#include<iostream>
#include<fstream>
using namespace std;
int main()
{
char c;
ifstream fin;
handling/file.txt");
if(!fin)
{
cout<<"File not found"<<endl;
}
else
{
while(!fin.eof()) //string ="Hello"
{
fin.get(c);
cout<<c;
// Output=Helloo why?
}
}
fin.close();
return 0;
}

heyram