Giving a function implementation more than one name in c++

后端 未结 6 1611
走了就别回头了
走了就别回头了 2021-01-19 03:29

Let say I have a basic 2D vector class something like

class vector2
{
  int x, y;
}

these two values could be used to represent a position

6条回答
  •  难免孤独
    2021-01-19 04:19

    you could use preprocessor #defines.... if you're into the world's worst bugs. You'll get the equivalent of guaranteed inline if you want, or just aliases if you want that too.

提交回复
热议问题