KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
If I have the following code: struct someStruct { int x; int y; } class someClass { public: someStruct m_member; alias m_x = m_member.x; // I am aware alias is not a keyword and even if it was, I cannot assign it a value like this alias m_y = m_member.y; // I am aware alias is not a keyword and even if it was, I cannot assign it a value like this } Can I give aliases to m_member.x and m_member.y without incurring the extra storage cost of a reference (which is the same as a pointer)? Something similar to a typedef?
Tags (comma-separated)
Save Edits
Cancel