私はこれを何をするのかについては何の手がかりもありません
#include "fstream"
#include "iostream"
using namespace std;
#define out(a) cout << #a << ": " << a << '\n'
void print(string s)
{
cout << s << '\n';
}
int main()
{
ifstream readt1;
readt1.open("test1.yaml");
while(readt1.good())
{
char cc[128];
readt1.get(cc,128);
out(cc);
}
readt1.close();
}
そのコード...これを出力します:
cc: version: 0.14.1
cc:
test.yamlはこれです
version: 0.14.1
name: scrumbleship
author: dirkson
description: >
A minecraft like game that allows you
to build your own spaceship!
私はこれを機能させるために非常に多くの方法を試しましたが、それは単に機能しません