+ 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

28th May 2018, 2:56 PM
LordRage
2 ответов
+ 1
What's the problem? I dont seem to get any errors
28th May 2018, 3:25 PM
ReimarPB
ReimarPB - avatar
+ 1
i figuered it out, the values i entered were to high thx for the help though
28th May 2018, 3:26 PM
LordRage