Home > Mobile >  Dear bosses, the parameters of a function for two enumeration types: what happened?
Dear bosses, the parameters of a function for two enumeration types: what happened?

Time:04-01

Dear bosses, the parameters of a function for two enumeration types: what happened?

false code below
Enum a {1, 2, 3}
Enum b {1, 2, 3}

Void setc (enumType c) {
If (c==a: 1) {
}
If (c==b: 2) {
}
}

Excuse me each bosses, c type should be what?

CodePudding user response:

Can use the type int
  •  Tags:  
  • Qt
  • Related