FILE *test = fopen("text.txt", "rb");
for (int i = 0; i < lines; i++) {
fscanf(test, "%d %d", &a, &b);
G[a][b] = 1;
}
G
using System;
using System.IO;
namespace t_text_read_and_parsing
{
class Program
{
static void Main(string[] args)
{
var lines = File.ReadAllLines("text.txt");
foreach (var l in lines)
{
var tokens = l.Split(' ');
if (int.TryParse(tokens[0], out var a) && int.TryParse(tokens[1], out var b))
Console.WriteLine($"\t{a}\t{b}");
}
}
}
}