Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Bh
volatile int y; Class B { fooB(int); }
在 A.cpp
foo (int x) { return 2*x; } foo(y); // Here is the issue
当我尝试这样做时,我遇到了编译问题,因为我无法更改foo()函数的签名。我在标题中的问题有什么解决方案吗?
foo()