May 7, 2014 at 1:57am UTC
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;
May 7, 2014 at 2:11am UTC
Did you try running it? What do you think is the problem?
May 7, 2014 at 5:44am UTC
So do you suggest run this code in cpp format and check it can run?
Thats the way to identify the problem?
May 7, 2014 at 5:50am UTC
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 May 7, 2014 at 5:53am UTC
May 7, 2014 at 2:12pm UTC
because lineLength has "const" before, it cant be changed this program
May 7, 2014 at 2:55pm UTC
@kusoipro
Please don't do people's homework for them. It doesn't help the OP learn anything.