Question: what is wrong with following program?

I m doing the question and have to identify what is wrong with following program?

const int lineLength = 72;
cout<<"Enter a new value for lineLength:";
cin>> lineLength;

Did you try running it? What do you think is the problem?
So do you suggest run this code in cpp format and check it can run?
Thats the way to identify the problem?
Yes, that is what he is suggesting. The compiler will tell you right where the code is wrong and what is wrong with it. Though, knowing the basics of C++ would have made the error obvious too.
Last edited on
because lineLength has "const" before, it cant be changed this program
@kusoipro

Please don't do people's homework for them. It doesn't help the OP learn anything.
Topic archived. No new replies allowed.