S
Steve Pope
Compiling the following works on my system:
file main.cpp:
#include <iostream>
namespace space {
int foo;
}
main()
{
using space::foo;
#include "fragment"
cout << foo << endl;
}
file fragment:
foo = 3;
My question is, is there any reason it should not work because
the "using" statement needs to be in the file "fragment"? (I
believe it should be okay but I'm trying to decipher a communication
from a developer in a different environment than mine, along
these lines.)
Thanks,
Steve
file main.cpp:
#include <iostream>
namespace space {
int foo;
}
main()
{
using space::foo;
#include "fragment"
cout << foo << endl;
}
file fragment:
foo = 3;
My question is, is there any reason it should not work because
the "using" statement needs to be in the file "fragment"? (I
believe it should be okay but I'm trying to decipher a communication
from a developer in a different environment than mine, along
these lines.)
Thanks,
Steve