dimanche 25 novembre 2018

In C++ why do I have to do this?

Why do I have to use cin.get(); after using cin >> a?

#include<iostream>
using namespace std;
int main () {
char a; int b=0;
cin >> a;
cin.get();
cin >> b
 }

Aucun commentaire:

Enregistrer un commentaire