hey im trying to store data in a file from a struct? can anyone point me to how i should go about doing this, i tried like this but it says that cant convert my struct to char *
Code:
struct user_data{
	char username[25];
	char password[25];
};

......

ofstream file(USER_DATA,ios::out|ios::binary);
file.write(ud,sizeof(ud));
file.close();
can someone please point me on how i should do this thanks.