C ++: Array kopieren
Ist es möglich, so etwas in C ++ zu machen (kann es momentan nicht selbst testen)?
int myarray[10] = {111,222,333,444,555,666,777,888,999,1234};
void functioncc()
{
int temparray = myarray;
for(int x=0; x<temparray.length; x++){
.... do something
}
}
Und vielleicht das (aber ich glaube nicht, dass es das ist):
int array1[5] = {0,1,2,3,4,5,6,7,8,9};
int array2[5] = {9,8,7,6,5,4,3,2,1,0};
void functioncc(int arid)
{
temparray[10] = "array"+arid;
........
}
Ich kann so etwas in JavaScript machen, aber wie gesagt - glaube nicht, dass es in C ++ möglich ist.
Vielen Dank für Ihre Zeit