Mega Code Archive

 
Categories / C++ / Data Type
 

Declares str just before it is needed

#include <iostream> using namespace std; int main() {   float f;   double d;   cout << "Enter two floating point numbers: ";   cin >> f >> d;   cout << "Enter a string: ";   char str[80];     cin >> str;   cout << f << " " << d << " " << str;   return 0; }