#1) Never do this:
Code:
void make_my_string(char *some_string, int *some_int) {
some_string="hello";
altho you could do this:
Code:
void make_my_string(char *some_string, int *some_int) {
strcpy(some_string,"hello");
However, in your example mystring does not have any memory space allocated to it! To do that you must use malloc, in main():
Code:
int main() {
char mystring=malloc(6);
Be sure you understand that this means some_string now points to 6 bytes of memory into which you can store data. If you redirect this pointer, that is, if you use it on the left side of an = equal sign, then you have reassigned it, and those 6 bytes of storage DO NOT come with it!!!!