int main()
{
char* NamePointer = new char;
std::cout << "Enter the file you want to edit (MUST BE IN THE PROJECT S DIRECTORY): ";
std::cin >> &NamePointer;
const char* FileName = NamePointer;
delete &NamePointer;
return 0;
}
这给我留下了标题中的错误:
std::cin >> &NamePointer;
任何想法? 这可能是一个简单的Im失踪,但当我看一看时,我没有回答。
JUST 缩略语 我在“&NamePointer”中引用了“和”;
Yeah I just found out another way of doing this using c_str(). Sorry!