首页 > 解决方案 > 如何将引号(“”)放入引号中?

问题描述

我在创建 .vbs 文件时遇到问题,因为此“”无法将其放入“”。有例子:在哪里 batch<<"echo x=msgbox(" <-- 这个引号挡住了最后一个。我怎样才能让它工作?

#include <iostream>
#include <fstream>

using namespace std;

int main()
{
    ofstream batch;
    batch.open("name.bat");
    batch<<"@echo off";
    batch<<"echo x=msgbox("Your Text Here" ,0, "Your Title Here") >> msgbox.vbs";
    batch<<
    batch.close();
    std::cin.get();
    return 0;
}

标签: c++cincoutofstream

解决方案


推荐阅读