char* temp = myString[j];
this is weird. ^^^ what do YOU think it does?
take the * out of that
what are you trying to do?
mystring is an array of string. you are swapping the characters of string 1 and 2 and 3 around, assuming all 3 strings are valid and have at least 3 or whatever letters.
ok.
consider strcmp for the comparison of 2 strings, line 23. what you have is not right.
also I was wrong, you are not looking at individual letters, I misread it. you have the right idea to swap the pointers.
I don't see an access violation, but print out i and j in the inner for loop each time and watch to see if that is behind it. and maybe j+1 as well, though you can do it in your head when checking.
After I managed to get the program to compile and run I started looking closer at the sort code.
It looks like you changed your original code. DO NOT do that. It makes if difficult for others to what is wrong and the following replies do not seem to match.
As I recall your original sort loops were:
1 2 3 4
for (int i = 0; i < len; i++)
{
for (int j = 0; j < len - 1; i++)
{
There is 1 reason that you are having a problem.
You have changed this, but I have not tried it yet.
I do believe that your sort is sorting pointers not strings. The if condition needs to be doing a "strcmp" of the 2 strings. the code if (myString[j] > myString[j + 1]) would work using a std::string in C++, but not in C.