I hate pointers with a passion, but they seem necesary as without them code like this wouldnt be able to shoot a bus error at me!
Anyone know what I did wrong?
#include <cstring>
class Address {
private:
char *number;
char *street;
char *area;
char *town;
char *county;
char *country;
char *post_area;
char *post_block;
public:
Address(){
number = "123";
street = "Fake Street";
area = "Faketown";
town = "Neverland";
county = "Marmite";
country = "vegimite";
post_area = "PR";
post_block = "0N";
}
char* get_address() {
return strcat(number, street);
}
};
Anyone know what I did wrong?
