Thread: error C2106: '=' : left operand must be l-value

  1. #31
    Registered User
    Join Date
    Sep 2006
    Posts
    835
    Quote Originally Posted by Elysia View Post
    And thank goodness for that! We don't have to manually indent poor indented source
    But that doesn't mean you should get away with not indenting properly... especially since it causes bugs!
    But the very fact that it causes bugs means the student is already punishing himself by not indenting while writing the code. So I don't think grading on indentation for the student's sake is needed. I agree with cpjust that it's reasonable for the teacher to have requirements for the purpose of saving time on grading, and students have been known to be deliberately obscure to try to pull a fast one, but nowadays modifying indentation can be done with a mouse click. And even if the student indents consistently, it may be in a style that the teacher personally can't stand, in which case the indenting has to be changed anyway.

  2. #32
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by robatino View Post
    But the very fact that it causes bugs means the student is already punishing himself by not indenting while writing the code. So I don't think grading on indentation for the student's sake is needed. I agree with cpjust that it's reasonable for the teacher to have requirements for the purpose of saving time on grading, and students have been known to be deliberately obscure to try to pull a fast one, but nowadays modifying indentation can be done with a mouse click. And even if the student indents consistently, it may be in a style that the teacher personally can't stand, in which case the indenting has to be changed anyway.
    But if the teacher warns the students ahead of time that they will lose points for bad/no indentation, then they'd actually want to indent the code. Learning through doing, and doing through fear.

  3. #33
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by robatino View Post
    But the very fact that it causes bugs means the student is already punishing himself by not indenting while writing the code. So I don't think grading on indentation for the student's sake is needed. I agree with cpjust that it's reasonable for the teacher to have requirements for the purpose of saving time on grading, and students have been known to be deliberately obscure to try to pull a fast one, but nowadays modifying indentation can be done with a mouse click. And even if the student indents consistently, it may be in a style that the teacher personally can't stand, in which case the indenting has to be changed anyway.
    I agree with cpjust. Indentation and coding styles are just too important to skip. So your grade should suffer if you don't indent properly. Of course, the teacher should notify the students that indentation is important.
    Last edited by laserlight; 02-08-2008 at 04:44 AM. Reason: Removed remark that is relevant to the Gender and Language thread.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #34
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,412
    sobieski19, good to see that you have made use of the advice in this thread.

    Several replies to this thread have been moved to Gender and Language in the General Discussions board.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Odd 3D Invis Objects?
    By Zeusbwr in forum Game Programming
    Replies: 4
    Last Post: 12-07-2004, 07:01 PM
  2. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  3. pointer to array of objects of struct
    By undisputed007 in forum C++ Programming
    Replies: 12
    Last Post: 03-02-2004, 04:49 AM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  5. Please help me
    By teedee46 in forum C++ Programming
    Replies: 9
    Last Post: 05-06-2002, 11:28 PM