>>106983776 (OP)
>send her this
>replace emma with her name
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
char *name;
char *location;
char *time;
int charmLevel;
} DateInvitation;
DateInvitation* createInvitation(char *name, char *location, char *time, int charm) {
DateInvitation *invitation = (DateInvitation*)malloc(sizeof(DateInvitation));
if (invitation == NULL) {
printf("Memory allocation failed! No coffee date today...\n");
exit(1);
}
invitation->name = (char*)malloc(strlen(name) + 1);
invitation->location = (char*)malloc(strlen(location) + 1);
invitation->time = (char*)malloc(strlen(time) + 1);
if (invitation->name == NULL || invitation->location == NULL || invitation->time == NULL) {
printf("Memory allocation for details failed! Can't ask her out...\n");
exit(1);
}
strcpy(invitation->name, name);
strcpy(invitation->location, location);
strcpy(invitation->time, time);
invitation->charmLevel = charm;
return invitation;
}
void askOut(DateInvitation *invitation) {
printf("Hey %s, I was wondering if you'd like to grab a coffee at %s around %s?\n",
invitation->name, invitation->location, invitation->time);
if (invitation->charmLevel > 7) {
printf("*%s smiles* 'That sounds lovely! See you there!'\n", invitation->name);
} else {
printf("*%s hesitates* 'Hmm, I'll think about it...'\n", invitation->name);
}
}
void cleanupInvitation(DateInvitation *invitation) {
free(invitation->name);
free(invitation->location);
free(invitation->time);
free(invitation);
}
int main() {
DateInvitation *coffeeDate = createInvitation("Emma", "Starbucks", "3 PM", 8);
askOut(coffeeDate);
cleanupInvitation(coffeeDate);
return 0;
}
you can send her a link to a web compiler.
>she will def block you if you tell to install gcc or clang