Question: time poster. I am running Excel 2010 and I've done some VBA stuff, but I'm still kind of a novice, and I've really been spinning my wheels on this one. So...

My worksheet has these cells — here is what they do (this is hypothetical):

* A1 is blank; it will have something entered later.
* B1 will have a cell address in it — let's say that address is B3. This address will be generated by excel formulas based on what I put into A1 (that part I was able to do).
* C1 will have something it in — let's say the word "hello".

Here is what I need a macro to do, as soon as I put that something into A1 and hit return:

1. Grab the cell address from B1
2. Grab the word "hello" from C1
3. Put the word "hello" into B3
4. Go to A1 and erase its contents, but leave the cell active, and then end

Thanks in advance for any help that can be given on this!

Answer: 
The problem is that you never create a new name, but all course structures' name pointers point to the same memory region, which is the one you are allocating at the start of `main`.

This should do it (waring untested): 

```
program_quit = false;
printf("Add Course: ");
char* name = malloc(100 * sizeof(char));   
scanf("%s", name);    
my_list.name=name;
insert_course_at_front(&my_course, my_list);

```

However, I would warn against writing such code in anything related to production code. If the user enters more than 100 characters, you get corrupted memory and if he enters less, you are wasting memory. I think in `C` (i haven#t written production quality c-code in a long long time) you would usually read the input character by character into a local buffer (stopping when either the buffer si full, or you get e.g. a newline) and then allocate a chunk of memory of the appropriate size and finally copy the string to that allocated chunk of memory.
Change

```
typedef struct course {
char *name;
BST students;
} Course;

```

to

```
typedef struct course {
char name[MAX_LEN];
BST students;
} Course;

```

to have some space to place the name

**EDIT - On new info**

```
    Course new_course;
    new_course-> name = malloc(MAX_LEN);

    scanf("%s", new_course->name); // This could be better to prevent buffer overwrite
    insert_course_at_front(&my_course, new_course);

```