string menu = "\nChoose an option:\n1. Push Front\t2. Push Back\t" + "3. Pop Front\t4. Pop Back\n5. Front Value\t6. Back Value\t" + 7. Delete Nodes\n8. Clear List\t9. List Size\t10. Print List\t11. Quit\n";
我想知道如何初始化大约180个字符长的字符串,但我想连接它,因为我不希望整个字符串出现在一行.我想离开包装线代码.
解决方法
删除符号,预处理器将连接字符串,如下所示:
string menu = "\nChoose an option:\n1. Push Front\t2. Push Back\t" "3. Pop Front\t4. Pop Back\n5. Front Value\t6. Back Value\t" "7. Delete Nodes\n8. Clear List\t9. List Size\t10. Print List\t11. Quit\n";