Mega Code Archive
Declares str just before it is needed
#include
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;
}