Ok so here are the parts of my code that I\'m having trouble with: char * historyArray; historyArray = new char [20];
This question already has answers here: 开发者_高级运维Closed 11 years ago. Possible Duplicate: Getting Segmentation Fault
In an interview, I was asked to write an implement开发者_运维百科ation of strcpy and then fix it so that it properly handles overlapping strings. My implementation is below and it is very naive. How d
hello I have a code like the one below char *str ; strcpy(str, \"\\t<\"); strcat(str, time); strcat(str, \">[\");
Why does the below C code using strcpy work just fine for me? I tried to make it fail in two ways: 1) I tried strcpy from a string literal into allocated memory that was too small to contain it. It c
Can someone please explain to me why strcpy() is necessary to assign strings to character arrays, such as in the following code snippet.
Why is that strcpy() accepting char array pointer even though the definition of strcpy is char * strcpy( char * , const char * ) ??
I know that you will rap me over the knuckles but. Why does it make Segmentation fault char* cmd; strcpy(cmd, argv[0]);
I have a global structure: struct thread_data{ char *incall[10]; int syscall arg_no; 开发者_如何学Python int client_socket;
getting this error: 1>c:\\users\\b1021568\\documents\\visual studio 2010\\projects\\tarefa42\\tarefa