1300.1
Hi All
I am a novice to C++. So dont know anything about it. Now i have written a .cpp file say A.cpp and want to include it in B.cpp. Initially what I was doing was just including A.cpp in B.cpp but later I found out that it is not the right way. But i am unable to figure out how to make a header for A.cpp. My A.cpp file goes the following way:
#include <I include sone header files here>
class A {
private:
static char *ca1;
static char *ca2;
static void readFile(void);
static string wirteFile(void);
}
char* A::ca1 = new char[10];
char* A::ca2 = new char[10];
void readFile() {
cout<<"hello";
}
void writeFile() {
cout<<"hello";
}
Now what all shoud I include in header file and what all remain in my .cpp file???
Thanx in advance
Hi All
I am a novice to C++. So dont know anything about it. Now i have written a .cpp file say A.cpp and want to include it in B.cpp. Initially what I was doing was just including A.cpp in B.cpp but later I found out that it is not the right way. But i am unable to figure out how to make a header for A.cpp. My A.cpp file goes the following way:
#include <I include sone header files here>
class A {
private:
static char *ca1;
static char *ca2;
static void readFile(void);
static string wirteFile(void);
}
char* A::ca1 = new char[10];
char* A::ca2 = new char[10];
void readFile() {
cout<<"hello";
}
void writeFile() {
cout<<"hello";
}
Now what all shoud I include in header file and what all remain in my .cpp file???
Thanx in advance