首页
社区
课程
招聘
未解决 [求助]西佳佳的代码如何改错啊
2021-2-8 13:03 2862

未解决 [求助]西佳佳的代码如何改错啊

2021-2-8 13:03
2862
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<iostream>
#include<fstream>


using namespace std;

int main()
{
    string ye[12] = { "ye.001",\
                      "ye.002",\
                      "ye.003",\
                      "ye.004",\
                      "ye.005",\
                      "ye.006",\
                      "ye.007",\
                      "ye.008",\
                      "ye.009",\
                      "ye.010",\
                      "ye.011",\
                      "ye.012"};
                      
    ifstream inFile1(ye[0], ios::in|ios::binary);
    inFile1.close();

    system("pause");               
    return 0;

}


编译无法通过,是string对象转字符串的问题,我不知道怎么修改?

谢谢大家。


[培训]科锐软件逆向50期预科班报名即将截止,速来!!! 50期正式班报名火爆招生中!!!

收藏
免费 0
打赏
分享
最新回复 (2)
雪    币: 3885
活跃值: (3908)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
Mxixihaha 2021-2-8 13:05
2
0
ye[0].c_str()
雪    币: 27
活跃值: (127)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
Xenophon 2021-2-20 12:46
3
0
C++11 支持从 string 打开,不支持 C++11 的就用上面的办法。
游客
登录 | 注册 方可回帖
返回