#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
string firstName, lastName;
int score;
fstream inputStream;
inputStream.open("player.txt");
inputStream >> score;
inputStream >> firstName >> lastName;
cout <<"Name: " <<firstName <<" "
<< lastName <<endl;
cout << "Score: " <<score <<endl;
inputStream.close();
return 0;
}
player 파일에 점수 이름쓰고 어디다 놔둬야지 이거 점수 ,이름 나오는건가요
바탕화면에 player txt파일 만들어놓으니까 안됌
생초보인데 알려주셈요
상대경로에 대한 개념이 없으면 절대경로라도 쓰던가 모질아
ㄴ 책에있는거 그대로 썻는데 안돼서그럼 생초보라 막막함 지식을전해주십쇼
파일 절대경로쓰라고 모질아 한국어모르냐
inputStream.open("player.txt"); 를 inputStream.open("c:\\\\player.txt");