Trouble with debugging

I am having trouble with debugging this code, I think I messed it up somewhere but I cant tell where. And every time I try debugging it a pop up says something about not being able to find the right file.
Here is the code:

#include <iostream>
using namespace std;

int main()
{
int number = 0;
int positive = 0; //counter
int negative = 0; //counter

cout << "Enter a positive or negative integer (enter 0 to end): ";
cin >> number;

while (number != 0)
{
//update counters
if (number > 0)
positive =+ 1;
else
negative =+ 1;
//end if

cout << "Enter another positive or negative integer (enter 0 to end): ";
cin >> number;
}//end while

cout << endl;
cout << "Total positive integers: " << positive << endl;
cout << "Total negative integers: " << negative << endl;
return 0;
} //end of main function

Well, if I got it right, you need to sum up negative and positive numbers. I believe the the error is pretty much when you sum them up. It should looks like this:

1
2
3
4
5
6
7
if(number > 0) {
    positive +=1;
    //or this: positive++;
} else {
    negative +=1;
    //or this: negative++;
}


Hope it helps!
And also, this verification is not precise. When the user type 0, it will increment the negative counter. Therefore, add some extra verification.
Thanks, this helped a lot.
Topic archived. No new replies allowed.