Trying to get this old noggin around Namespaces....
Is there a way for the last cout to access name from the namespace above?Code:#include <iostream>
#include <string>
int main()
{
{ using namespace std;
static string name;
cout << "What is your name? ";
getline(cin,name);
cout << "Hello, " << name; }
std::cout << "Are you really, " << name;
return 0;
}
I either get errors saying there's no such variable or that it's not a member of std...
LOL... and I thought classes were confusing....