Pathfinding using c++

First of all I know that doing navigation is easier with blueprints but for a project I have to do it with c++. My objective is to make an enemy that uses AI to calculate the fastest path to the player. I already have the basic set up for AI perception and know how to use algorithms for pathfinding. The problem is that I don’t know how to create a grid that the algorithm can use. Does anybody have any tips for making a grid using blueprints or c++.

Thanks in advance.