file scope and static floats

后端 未结 5 1068
无人共我
无人共我 2020-12-10 22:55

I\'ve run into an interesting problem in an AI project of mine. I\'m trying to format some debug text and something strange is happening. Here\'s a block of code:

5条回答
  •  北海茫月
    2020-12-10 23:35

    You could change the static variable to a #define, and set a member variable in a singleton equal to it. Modifications and accesses would apply to the singleton's member variable.

提交回复
热议问题