Check out example codes for "good() in c++". It will help you in understanding the concepts better.

Code Example 1

// C++ code to demonstrate 
// the working of good() function 
#include <bits/stdc++.h> 
using namespace std; 
int main() 
    // Stream 
    stringstream ss; 
    // Using good() function 
    bool isGood = ss.good(); 
    // print result 
    cout << "is stream good: "
         << isGood << endl; 
    return 0; 

Learn ReactJs, React Native from