No Match for 'Operator>>' in 's>>local"

前端 未结 2 1373
春和景丽
春和景丽 2021-01-27 11:01

This function is preventing Wagic: the homebrew from Compiling:

/home/white/Pandora/wagic-read-only/projects/mtg/src/GameOptions.cpp:1156: error: no match for ‘operator

2条回答
  •  面向向阳花
    2021-01-27 11:53

    operator >> is defined only for built-in types like, int, float, char, double etc. and it can input the address using pointers. Since your variable local is of custom type LocalKeySym. you may have to define your own operator >>.

    It should be similar to overloading istream and ostream operators. See the tutorial here.

提交回复
热议问题