ok, so just so I'm clear, did you mean "less than" when you wrote this? (it seems like you would mean "more than"?
Unless that is something with the strcpy function copying a string that is smaller than the array. But I thought if I make an array 20, then it will just copy whatever is 20 or less.
This is alot less automatic than those higher level languages.
strcpy() copies from the source to the destination until a null character is encountered. So, suppose the destination array is an array of 20 characters, including one character reserved for the null character. Supposed argv[1] contains all the letters of the English alphabet. There is not enough space to store the contents of argv[1] in the destination array, so strcpy() will keep copying, even if it means writing into memory that it should not be writing to.Originally Posted by argv
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)