Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use a 'namespace'

Status
Not open for further replies.

cadbilbao

Programmer
Apr 9, 2001
233
ES
Hi.

I want to create a namespace called 'my_Lib', and I declare
it at the beginning of my code. Afterwards, I call it within
a function:

------------------------//---------------------------
include's
...
...
namespace my_Lib{
using std::string;
string Convert( const int& s);
inline string Convert( const int& s)
{
...
};
}
...
...
myfunction1(){
...
}
...
...
myfunction2() {
using std::string;
using namespace my_Lib;
int number=50;
string My_Value;
MyValue = Convert( number ); <<<error line
}
...
-------------------//----------------------------------

But I get this error message:
**********
error C2065: 'Convert' : undeclared identifier
**********

I would be extremely obliged if anybody could explain me how to
use my namespace within a function.

Regards.
 
try changing
using namespace my_Lib; to
using my_Lib::Convert(int&);

HTH,
JC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top