What is the difference between sending a string directly than sending a pointer to a string to a function?
For example:
void foo(char * a){//suppose foo reads and/or writes to the passed string
...
}
int main(){
foo("asdf");//what is the difference between this
char a[]="asdf";
foo(a);//and this?
}
With the first I'm getting all sorts of access violation errors while with the second I don't, so what is the difference between the two?