Hello I'm actually programming a game in c++ and SFML and I would like to know how to wright the text of dialog Box in my code (I'm french so I write original dialog in french and I need to change them easely .
&
I also need to know how to read line per line in a file open with iostream. In fact I have to say to my code "go pick that info at X line"
Thanks you in advance for your answer and sorry for my bad english
#include <iostream>
#include <vector>
#include <string>
#include <fstream>
using std::cout;
using std::cin;
using std::string;
using std::vector;
using std::ifstream;
int main()
{
vector<string> lines; // create an empty vector of strings
ifstream src(__FILE__);
if (!src)
{
perror(nullptr);
return errno;
}
string line;
while (getline(src, line))
{
lines.push_back(line);
}
// just to see if we read all lines correctly
for(const string& s : lines)
cout << s << "\n";
}