what is variant member in c++?

前端 未结 3 835
囚心锁ツ
囚心锁ツ 2021-02-20 00:34

I am new to C++. I read very frequently from some sites that variant member?.

class School
{
  int x; -> data member. 
}

I know data member

3条回答
  •  抹茶落季
    2021-02-20 00:55

    A variant is a structure containing a union member and an unsigned integer member that describes which member of the union is currently being used. If you don't know what a union is, read about it first, and then come back.

提交回复
热议问题