Problem sort
User AaravRastogi
Submission Time 2025-12-03 14:12:41
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sort.cpp: In function ‘int main()’:
sort.cpp:14:9: error: request for member ‘begin’ in ‘m’, which is of non-class type ‘std::string [n]’ {aka ‘std::__cxx11::basic_string<char> [n]’}
14 | sort(m.begin(),m.end());
| ^~~~~
sort.cpp:14:19: error: request for member ‘end’ in ‘m’, which is of non-class type ‘std::string [n]’ {aka ‘std::__cxx11::basic_string<char> [n]’}
14 | sort(m.begin(),m.end());
| ^~~
sort.cpp:16:41: error: ‘i’ was not declared in this scope
16 | for (int j = 0; j < n; ++j){ cout << m[i];}
| ^