cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
array error
array error
Jul 17, 2013 at 12:00am UTC
nmn
(47)
Hi
this array assignment gives the error of "lvalue required as left operand of assignment". Can someone explain to me why ? and how it can be resolved ?
Thanks much
[code]
IntArray a(10);
cout <<"low: " << a.low() << " high: " << a.high() << endl;
for(int i = a.low(); i <= a.high(); i++) {
a[i] =i * 10;
}
Jul 17, 2013 at 1:33am UTC
Cubbi
(4774)
Show the definition of
IntArray::
operator
[]
- it sounds like it returns int by value.
Topic archived. No new replies allowed.