title: What is a platform independent way of getting unique value of current instance (e.g. pid) in C++
body: <p>I would like to get a some kind (doesn't matter whether it's a process id or anything) of a unique integer value of current instance in C++ in a <strong>platform independent</strong> manner (that means no #if #else macro switch). </p>
  
  <p>time based value would not be reliable since two instances can start at the same time.</p>
  
  <p>Is there any way of achieving this?</p>
  
  <p>EDIT: It doesn't have to be globally unique. it just needs to be unique system wide.</p>