Colorado State University

This file defines the header for each page. An optional "icon" image (I use the textbook):

Replace this with info about this class:

CS253: Problem Solving with C++

Spring 2013

Home Page

Links to the various pages for this class:

Wish I could do this: * Schedule

This is the home page for CS253, Problem Solving with C++, a CSU Computer Science class.
Click on the links, above, for other class pages.


Here’s a signature date '+!!! B %-d %-I:P'

HW3 Clarifications

Sunday March 3 10:52AM

HW3 Due Date Delayed

Thursday February 28 8:33PM

HW3 is now due one week later, on March 13.

HW3 Available

Wednesday February 26 11:53PM

HW3 is now available.

Correction on Midterm #1 question 11:

Wednesday February 26 3:11PM

I just sent the following to my teaching assistants:

As you recall, there was a question about copy ctors on the midterm:

11) Write the declaration for a copy constructor for class Whatever. Yes, the declaration.

The best answer is:

    Whatever(const Whatever &); // pass argument by const reference

This answer, which will fail if trying to copy a const object, is also acceptable:

    Whatever(Whatever &);	// pass argument by non-const reference

Then there’s this answer. This is invalid C++ (see below), but, because I incorrectly stated in class that it’s valid, this should also be granted points for Midterm #1 only. If a student comes to you with the following, they should get a point for it:

    Whatever(Whatever);		// pass argument by value (INVALID C++)

In all cases, it’s also acceptable to put in a variable name:

    Whatever(const Whatever &w); // pass argument by const reference
    Whatever(Whatever &w);	 // pass argument by non-const reference
    Whatever(Whatever w);	 // pass argument by value (INVALID C++)

Why is the third one invalid? It seems reasonable, at first: we want to pass the argument by value. Just copy the actual parameter, from the calling code, to the formal parameter w. Wait--copy? How do you copy an object? You call the copy constructor. But this is the copy constructor! We can’t call the copy ctor from the copy ctor—that’s infinite recursion. That’s why we must use a reference.

That’s why the third one is invalid C++, and will not compile. But we shouldn’t punish the students for my error, so they get a point for it.

Midterm Silly Question

Tuesday February 25 10:19PM

The last question on the midterm was:

Name an animal whose scientific name (Latin name, binomen) (for example, Felis catus) is the same as the common name (for example, cat).

There are two answers:

Office Hours

Saturday February 23 12:10PM

My office hours will actually be in my office, CSB 246, Monday February 25 and Tuesday February 26.

HW2 Graded

Thursday February 21 6:24PM

HW2 scores are available: ~cs253/bin/grade HW2
Specify HW2 to get detailed feedback.

Q1 Curved

Sunday February 10 11:43AM

Q1 has been curved. ~cs253/bin/grade

HW2 Writeup Improved

Wednesday February 6 8:48PM

The HW2 writeup has been improved after today’s class, with many clarifications.

HW2 Available

Tuesday February 5 8:58PM

HW2 is now available.

HW1 Graded

Monday February 4 9:13AM

HW1 has been graded. For detailed information:

    ~cs253/bin/grade HW1

HW1 Solution

Thursday January 31 6:06PM

My read-only solution to HW1 is available here.

HW1 Available

Sunday January 27 11:18AM

HW1 is now available.

No Onions in CSB

Tuesday January 22 3:14PM

Please, no onions in the Computer Science Building, including the Linux Lab. One of our faculty has a severe allergy.

First Lab Optional

Monday January 21 1:38PM

Recitation (lab) the first week is optional. Attend if you need help logging in, editing files, using g++, or general help with HW0. If your recitation was Monday, then you may attend one of the other recitations (see the syllabus) this week.

Announcements go here

If I clarify an assignment, change a due date due to weather, etc., I’ll announce it here.

Page: Main.HomePage
Modified: February 27, 2013, at 11:54 PM
Wiki: pmwiki-2.2.35
CS Department
Apply to CSU | Contact CSU | Disclaimer | Equal Opportunity
Colorado State University, Fort Collins, CO 80523 USA
© 2012 Colorado State University