I thought I understood the tutorial well enough, but I keep getting an error when I try to compile. The error states "20 C:\transfer\cpp\junk\main.cpp `lm' undeclared (first use this function) " Dev-cpp highlights the line including when referencing this error. Thank you for your help. PS: trying to compile on win xp pro with dev-cpp 4.9.9.2
Code:
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
do {
int number;
int lm = 0;
system("clear");
cout<<"Enter a number between 1 and 10: ";
cin>>number;
for (int cntr = 1; cntr <= number; cntr++)
{
cout<<cntr<<"\n";
}
cout<<"\n\n";
cout<<"Go Again?\n1. Yes\n2. No\n";
cin>>lm;
} while (lm == 1);
cout<<"\n\n\n\n";
system("Pause");
}