hallo wie mache ich die funktiona
-
Wie schreibe ich das am besten um???
habe mir das als erstes vorgetselt wie ich es mache wen ich array benutze ich würde es so machen.void BoubleSort(int m[]. int CopySize) { //dhlosh Sunarthsewn int i; int j; // i=0; j=0; //Kuria sunarthsh for(i=CopySize-1; i>0;++i) { for(j=0;j<1;++j) { if(m[j]<m[j+1]) { Swap(&m[j],&m[j+1]); } } } } void Swap(int *p, int *q) { int temp; temp=*p; *p=*g; *q=tem
Danach habe ich mir überlegt wie ich es mache mit *pArray und zwar so aber habe nicht alles vertich weis nicht weiter
void BoubleSort(int *pArray. int CopySize) { //dhlosh Sunarthsewn int i; int j; // i=0; j=0; //Kuria sunarthsh for(i=CopySize-1; i>0;++i) { for(j=0;j<1;++j) { if((*pArray+j)<(*pArray+(j+1)) //Funkt nicht { Swap(???????);//wie soll ich das machen wo &*pArray=pArray ist also //mich übermitle nur eine copy } } } } void Swap(??????) { int temp; ?????? }
-
array[i] == *(array+i)
&array[i] == array+idamit sollte es wohl loesbar sein.
nur was ist der Sinn?
-
kannst du das mal kurz schreiben???