Комментарии:
thank you ! i finished the program and the get line function worked only for one time and i thought i had to start all over again but hey it is all that buffer thing ,so all i have to do is the ignore function just befor the get line to ensure that the buffer is empty right?
ОтветитьThat's really so useful, thank you !
ОтветитьInstead of writing cin.ignore ig we can use a dummy getline also to clear the buffer like
cin>>number;
string temp;
getline(cin,temp); //dummy getline
char s[256];
//then take your input
Superb explanation
ОтветитьHello!!! Nice video sir explainning a difficult concept like clear the buffer, but I have a qusetion, I'm using Netbeans for windows, and when I use the cin.ignore(1,'\n'), my program can delete 1 skip even if I just put 1 for ignore the '\n'. I whant to know if thi is because we areusing differents IDE's or it's because something else.
Ответитьnumeric_limits<streamsize>::max()
das goated, thanks g
C and C++ legend over here
ОтветитьAwesome explanation as usual. Thank you, Sir. Please, make more videos on interesting topics in C++
ОтветитьNice explanation!
ОтветитьThere is another solution that's a bit easier. You can do the following instead:
number = _getch();
include the <conio.h> library.
But thanks for the info. I didn't know you could this it like this too.
Nice explanation
ОтветитьI love how you make each and every video stand on its own feet, in the sense that the viewer has to never refer to a previous video to get hold of the topic being taught. Thank you for going the extra mile making each tutorial self-reliant!
ОтветитьThanks again👌
ОтветитьGreat video Sir. Your channel really helps me a lot in learning programming especially c++. But I have one question sir. Do you have any resources on how I can deeply understand buffers in c++ and how it works?
ОтветитьThanks it was helpful!
Ответитьthank you sir
ОтветитьThanks for this. On point, intelligent explanation.
ОтветитьNice, clear and concise explanation
Ответитьgood explain! thank you
Ответить👍👍👍
Ответить