class Solution { public:

vector<int> twoSum(vector<int> &numbers, int target) {

vector<int> index(2);

int len = numbers.size();

int a = 0, b = 1;

while (1) {

while(target != numbers[a] + numbers[b]) {

cout<<a<<" "<<b<<"\n";

b++;

if (b == len) {

a++;

b = a+1;

}`} if (target == numbers[a] + numbers[b]) { index[0] = a+1; index[1] = b+1; return index; } } } };`

I just want to try solving this by force, but the code just can't be accepted, which I think it goes well in my IDE, or is there any bug ?

any suggestion is appreciated. thanks!