Getting Geo Location or current location of the Computer(mac) through a C++ program

  c++, geolocation, location

I am trying to build a program which gives me the geo location/the current location of the Macbook when the program runs on that macbook. If there is any system API that can help it would be a better solution, i actually know one site that returns location of the device when you give a call to it in JSON format but I guess that will only work if we have internet services ON.Currently I am open to both the solutions but it should be specifically work in C++.

Source: Windows Questions C++