size of string 2d !

closed account (28poGNh0)
Hey Is there a way to get the size of this string

1
2
3
4
5
6
7
8
int main()
{
    string keyWords[] = {"bool","char","int"};

    int size = function(keyWords);

    cout << size << endl;
}


expected output
output : 3
size_t size = sizeof( keyWords ) / sizeof( *keyWords );
closed account (28poGNh0)
Thanks a lot @vlad from moscow
Topic archived. No new replies allowed.