DotNetGnat
Programmer
Guys,
I have the following code...may be its completed messed up...so please suggest me how to rewrite...
I am trying to call the method from class B in class A as shown in red...I am getting error...any suggestions...
-DNG
I have the following code...may be its completed messed up...so please suggest me how to rewrite...
Code:
ClassA.h
______
Class A
{
private:
A *a;
char *x;
public:
A(const char*);
~A();
int count(const char*);
};
ClassA.cpp
__________
A::A(const char* y)
{
a=0;
x=new char[50];
strncpy(x,y,50);
}
A::~A()
{
delete [] x;
x=0;
}
int A:: count(const char* y)
{
A a1(y);
[red]int count = BClassMethod(&a1,0);[/red]
return count;
}
========================================================
ClassB.h
_________
class B
{
public:
BClassMethod(A*, A*)
};
I am trying to call the method from class B in class A as shown in red...I am getting error...any suggestions...
-DNG