Resize the array

Pages: 12
Is there an un-using?
you can #undefine things to localize, so while I was half kidding, it seems to beat the using std::cout approach. I thought once you did a using, it was project wide (this being the real root of the issue at hand, actually...)

I am not really recommending an ugly #def answer, mind you, I am just asking if you can do it. If you can't, the powers that be need to get on the task of adding a "not using" command at the file scope.

closed account (48T7M4Gy)
@jonnin
Is there an un-using?

The last couple of posts are effectively the un-using statement. The beauty of it is it doesn't require a change to the standard, it is global and local all at the same time and it is silent requiring no typing whatsoever.

The wonders of C++ never cease to amaze ... :)
The using statement is limited to the scope in which it appears. It behaves like a declaration.

IOW, this does what it looks like:
1
2
3
4
int main() {
  using namespace std; // using directive "starts" here
  cout << "Hello World!\n";
} // using directive "ends" here 
Last edited on
closed account (48T7M4Gy)
Hence header/global/local terminology considerations.
that works, thanks!
Mbozzi no worries, no offence taken as what you wrote was not offensive.
Topic archived. No new replies allowed.
Pages: 12