I know that there are a lot of tutorials and also there are a lot of solutions in Stack overflow itself but I don't really get a concept of constructors - what is the purpose of writing them if compiling software will create one of it's own? My another question is if they are necessary how to write a proper one basing on my header file for c++ program:
#pragma once
class customers
{
public:
char firstname[50];
char lastname[50];
char address[64];
char password[50];
int age;
char email[100];
void Add_customer();
customers change_customer(customers);
void remove_customer(customers*[], customers);
void search_customer(customers, customers[]);
char getName();
void setName(char[]);
};
What should I avoid with writing the constructor and how to write one - I know that they allow to initialise variables from header written classes but this is all what I understand - so please use that header given above as example. Thank you for your time if you want to help me.