I know its possible to get a part of a .txt, then convert it to an integer, then store it in a variable, but is it possible to to that in a single declaration. (The variable needs to be global).
Ie:
[data.txt]
1020
[convert_data.cpp]
#include<fstream>
fstream convert("data.txt");
//way to declare something equal to A PARTICULAR POINT in data.txt
int main()
{
//how would I take this block of code and simplify it to two DECLARATIONS (not
//function calls), or, if that's not possible or not practical, how would I make
//n and m (or var1 and var2) global AND CONSTANT?
char var1[5];
convert.getline(var1,2);
char var2[5];
convert.getline(var2,2);
const int n=atoi(var1);
const int m=atoi(var2);
return 0;
}