+ 3
[solved] What did I do wrong? I want to use the string function for the array. Please help
#include <iostream> #include<string> using namespace std; int main() { string tab[2][2]={ {"Sentence 1/1","Sentence 1/2"}, {"Sentence 2/1","Sentence 2/2"} }; int a,b; cout << "Column\n"; cin >> a; cout << "Row\n"; cin >> b; cout << tab[a][b]; return 0; } if you're woundering, i entered to high numbers so there was an error
2 Respostas
+ 1
What's the problem? I dont seem to get any errors
+ 1
i figuered it out, the values i entered were to high
thx for the help though