c++ - Meaning of asterisk following a member function -


this question has answer here:

i new c++ , trying decode piece of code shown below. in particular basesetassoc::blktype* line, not sure asterisk means in case. appreciate insight.

basesetassoc::blktype* nmru::accessblock(addr addr, bool is_secure, cycles &lat, int master_id) {     // accesses based on parent class, no need special     blktype *blk = basesetassoc::accessblock(addr, is_secure, lat, master_id);      if (blk != null) {         // move block head of mru list         sets[blk->set].movetohead(blk);         dprintf(cacherepl, "set %x: moving blk %x (%s) mru\n",                 blk->set, regenerateblkaddr(blk->tag, blk->set),                 is_secure ? "s" : "ns");     }      return blk; } 

blktype isn't member function, it's type, possibly enum or struct if not inner class.

the basesetassoc:: needed access such "inner" types (defined within class, i.e. basesetassoc).

so basesetassoc::blktype* basesetassoc::blktype pointer.


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -