September 24th, 1999, 05:07 PM
How does one use the Keyword "using" in the C++ language. How is it declared, and how is it used. Explanation and an example would be great
Thanks in advance...
Thanks in advance...
|
Click to See Complete Forum and Search --> : Does anyone know this... September 24th, 1999, 05:07 PM How does one use the Keyword "using" in the C++ language. How is it declared, and how is it used. Explanation and an example would be great Thanks in advance... sstofka September 25th, 1999, 09:33 AM Check in namespaces for info. It is a way to distinguish between 2 different variables/functions: namespace Jack { void fetch(); } namespace Jill { double fetch; } using Jill::fetch; //tells compiler which one you want or you could write: using namespace Jill; cin >> fetch; //mostly it's used to make definitions visible for an include file: #include <iostream> using namespace std; Older compilers may not recognize the namespace keyword so you'll need to declare: #include <iostream.h> hope this helps. Steve Stofka September 27th, 1999, 10:09 AM using namespace std; means "please use this list of names so that U can avoid names conflict" as far as I understand. codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |