c++ - Abbreviate the full name of a type defined in a class -


which best way avoid write class name when use type defined in class?

for example have class myclass defined mytype type, out of class need use mytype , must write:

myclass::mytype foo 

i write only

mytype foo 

i've try with

#define myclass::mytype mytype 

it works think not solution. should use?

you can do:

typedef myclass::mytype mytype; 

Comments

Popular posts from this blog

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -