-1
const int N = 5;

struct array_str {
    int array[N];
    unsigned int size;
};

int main(int argc, const char * argv[]) {
    // insert code here...
    std::cout << "Hello, World!\n";
    return 0;
}

void readArray(array_str& v){
    
    for (<#initialization#>; <#condition#>; <#increment#>) {
        <#statements#>
    }
    
}

What does "array_str& v" means in the parenthesis? I'm not passing the struct bcs I would do that in this way "struct array_str name", v is a variable but why would you write it like that?

Simo22883
  • 11
  • 1

1 Answers1

1

is the parameter of the type array_str passed as reference under the name v when you call the function readArray

ΦXocę 웃 Пepeúpa ツ
  • 47,427
  • 17
  • 69
  • 97