I have the following class structure:
class A {
template<typename T> static void f(const T& input) {
//do something with X and input
}
static ostringstream x;
}
Then in main I do:
...
int n = 5;
A::f(n);
...
This compiles fine, but I get a linkage error that A::x is a symbol that cannot be found. Has anyone encountered this error?
Thanks!
yes, you’ve yet to define
x: