basic loop error
Ok. im a newb at c++. two days of learning. anyways, tell me what is wrong w/ this, because my computer just keept beeping, then froze!
Code:
// beeep.cpp : main project file.
#include "stdafx.h"
#include <iostream>
using namespace std;
void doBeep(int nob)
{
while(nob!=0)
cout << "\a";
nob = nob-1;
}
int main()
{
cout << "Enter how many \"beeps\" you would like:" << endl;
int nob;
cin >> nob;
doBeep(nob);
return 0;
}

I didn't get to help. Sigh. The early bird gets the worm. We need more people with compile/runtime errors here....