?
Vielen Dank! Das war flot!
Wenn ich mal C kann helfen ich auch im Forum
Die Rechnung ist nicht so wichtig, ich muss nur Verstehen wie der Austausch von Parameter bzw. Zeigern funktioniert.
Das Programm funktioniert auch, nur weiß ich nicht genau warum.
Warum:
float projektion(float x[],float y[],float xy[], float size);
statt
void projektion(float x[],float y[],float xy[], int size);
Die Funktion gibt doch der aufrufenden Funtktion aus main einen Wert zurück?
Und:
[cpp]
printf("\nErgebnissvektor:\n\n");
projektion(a_array,b_array,xy_array,size);
for(i=0;i<size;i++)
{
printf("\nba[%f] = ", xy_array[i]); /* Übergabe die nicht geht */
}
return 0;
}
void projektion(float x[],float y[],float xy[], int size)
{
int count;
for(count=0;count<size;count++)
{
xy[count]=x[count]+y[count]; /*Ich muss zwei Werte zurückgeben*/
[/cpp]
Zum Verständnis:
projektion(a_array,b_array,xy_array,size);
Übergibt beide Werte von a_array und beide Werte von b_array??? Ich brauche kein count.
wie kann xy_array[i]); alle Werte zurückgeben, obwohl kein count zählt??
Vielen Dank