0

Hello everyone:

I'm having a problem with vector indexing. The following code results in a segmentation fault:

```
for (int i = 0; i < (rows * rows); i++)
{
temperature[(i * rows) + (rows - 1)] = 0;
}
```

And:

```
for (int i = 0; i < (rows * rows); i++)
{
temperature[i * rows] = 3;
}
```

According to my reading, it is possible to use expressions involving calculation as vector indices. I would very much appreciate it if someone could suggest what I'm doing wrong.

Thank you for any help.