Handling default value for int64_t representing an edge in an adjacency matrix
Use of macros
In this case, the macro you using is from a library header that was included with your compiler. This header (ultimately limits.h, although &lt;climits&gt; is usually used with C++ code) is also used by C code, so C++ specific language features cannot be used. These are OK to use.
The C++ way of referencing a minimum value for a type is to make use of std::numeric_limits (in the &lt;limits&gt;) header. In your case, you can replace _I64_MAX with std::numeric_limits&lt;int64_t&gt;::min().
Other notes
All of the references to this-&gt; are unnecessary and can be removed from your code. You rarely need to specify this in C++ code (there a few specific cases where it is needed, like for variable name disambiguation or calling a function thru a member function pointer).
The for loop might be able to be rewritten using iterators or the range-for style if this is supported by the SinglyLinkedList type.