Sam379
Sam379

Reputation: 271

Passing string array to the function C++

I want to pass a string array to the function like this int function (string text[]) . But the IntelliSense says that identifier string is undefined . Why can't I pass a string array like usually I do with int arrays ?

Upvotes: 0

Views: 2141

Answers (1)

austin
austin

Reputation: 5866

Are you using std::string or just string? Try adding using std::string if you don't have it in your code.

Upvotes: 2

Related Questions