Navigation

So how should i get a map if i want to implement my own pathfinding method? through a navmesh, grid, or graph? and how do i actually store the map in C++ code?