It worked fine on my system. I typed bob and then bob.txt appeared.
Unrelated: I like that you are using std::, but you are not using it everywhere and usingnamespace std; is still at the top
Can you add std::cout << "Name: " << Name << std::endl; between the std::getline and opening the file? I'm curious if for some strange reason it is blank.
Well on mine, it's just creating a file like this : ".txt".
I think it doesn't regist the Name..
That sounds suspiciously like the code you're actually using differs from the code you supplied here in a significant way. Specifically, it sounds as if you're doing an input operation prior to getline that leaves a newline in the input stream which getline then encounters and interprets as an empty line.
Please verify the code that you post on these forums reflects the issue in the actual code you're using.