T
trying_to_learn
im in the primary stages of learning C++. The book im learning from says
Dont use using namespace.. directive in header file
However im trying to make the following header file.I need to include
<string> header file and also will have to say using namespace std to
make the string class visible.
qn)how do i resolve the requirement of *not* using the "using" directive
in the header file and at the same time declare my structure in the
header file?.Pls excuse me if this is a dumb qn. im just starting out
#ifndef FIRSTOOPSTRUCT_H
#define FIRSTOOPSTRUCT_H
struct firstoopstruct
{
int data;
void behav(string);
};
#endif
Dont use using namespace.. directive in header file
However im trying to make the following header file.I need to include
<string> header file and also will have to say using namespace std to
make the string class visible.
qn)how do i resolve the requirement of *not* using the "using" directive
in the header file and at the same time declare my structure in the
header file?.Pls excuse me if this is a dumb qn. im just starting out
#ifndef FIRSTOOPSTRUCT_H
#define FIRSTOOPSTRUCT_H
struct firstoopstruct
{
int data;
void behav(string);
};
#endif