*SOLVED*Why am I getting a segfault here?

This causes a segfault

#include <iostream>
using namespace std;

const int WORLDHEIGHT = 20;
const int WORLDWIDTH = 80;

class world{
public:
    char worldGrid[WORLDHEIGHT][WORLDWIDTH];
    world();
    void updateWorldGrid(){
        for (int i =  0; i < WORLDHEIGHT; i++){
            for (int j = 0; i < WORLDWIDTH; i++){
                cout << worldGrid[i][j];
            }
            cout << '\n';
        }
    }
};

world::world(){
    for (int i =  0; i < WORLDHEIGHT; i++){ for (int j = 0; i < WORLDWIDTH; i++) worldGrid[i][j] = ' ';}
}

int main(){

    world sampleWorld;
sampleWorld.updateWorldGrid();

return 0;
}

Both valgrind and gdb say that I have problems at world::world() but I really don't know what is the problem there. It's probably a noob question but it's grinding my gears. Oh and it also doesn't do what I asked it(segfaults are kinda random).

Do I need to allocate the array manually? Thanks to anyone for the help in advance.

EDIT: I made a mistake when incrementing in my second loops in both word::word() and updateWorldGrid() thanks to @DevBlox and @sheepy for showing how blind I am :)

You made a simple mistake to make

world::world(){
for (int i = 0; i < WORLDHEIGHT; i++){ for (int j = 0; i < WORLDWIDTH; i++) worldGrid[i][j] = ' ';}
}

Notice the second loop, the comparison and increment is wrong :)

Both inner loop increment variable is i, not J :)

@DevBlox @sheepy Thank you very much. And this is why you never code when you are half dead. I feel stupid now.
So as I understand. My i increment was overflowing and that caused a segfault correct?

Your array only WORLDHEIGHT size and get the error when try get WORLDHEIGHT + 1 (21)

WORLDWIDTH is 80

So this increment to 21

Got it. Thank you.

Solved