Do you have some other worldobject on the same map that you have access to?
For example if you are trying to do this stuff when a player does something and the creature should be near the player (on same map, probably in sight),
you have access to player (a worldobject).
Then you can do this:
Creature* creature = sObjectAccessor::GetCreature(*player, MAKE_NEW_GUID(dbguid, entry, HIGHGUID_UNIT));
You can get dbguid and entry from the database or w/e
Im hoping you are not in an instance /emoticons/default_smile.png