|
-
September 24th, 1999, 05:07 PM
#1
Does anyone know this...
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...
-
September 25th, 1999, 09:33 AM
#2
Re: Does anyone know this...
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
#3
Re: Does anyone know this...
using namespace std; means "please use this list of names so that U can avoid names conflict" as far as I understand.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|