I have created a class inside a namespace now the problem occurs when i would have to use or call the namespace, What could be the possible reason for compiler error ??
namespace name1
{
class show
{
int a,b;
void accept_data(void);
void display_data(void);
friend void use_class(void);
};
}
Compiler Errors -
test1.cpp: In function ‘void use_class()’:
test1.cpp:17:6: error: ‘void name1::show::accept_data()’ is private
test1.cpp:31:16: error: within this context
test1.cpp:24:6: error: ‘void name1::show::display_data()’ is private
test1.cpp:32:17: error: within this context
use_class
declared? – pmr