Changes

Jump to: navigation, search

User:Andrew Daniele

132 bytes added, 21:38, 4 October 2013
Other
Programming Code of the update:<br />
----
unfortunately I wasn't able to utilize this in the assignment, but I thought I'd share. It's simple, it's elegant, it's efficient. If the user were to go past strLen+1, this would patch up NULL bytes between the string and the character inserted could then be displayed by the display method as it printed everything up to the first NULL byte.
 
 
<syntaxhighlight lang="cpp">
while(!editStr[--i]) /*sorting an array of ints*/void makeAscending(int* arr, int size)patches NULL bytes to join string
{
int i; int j; int temp;  for (i = 0; i < size; i++) { for(j = i+1; j < size; j++) { if (arr[i] > arr[j]) { temp = arr[i]; arreditStr[i] = arr[j]; arr[j] = temp' '; } } }
}
</syntaxhighlight>

Navigation menu