1020: Introduction to Programming Winter 2014

Frequently Asked Questions

This page contains answers to some questions that students have already asked (in this case "frequently" means "one or more times"). It should be a good place to start looking for the answers to your questions. The are organized as follows:

If you have questions that aren't answered here, or if you don't understand the answer given here, please ask your question either in class, in office hours, or by e-mail.

Course Software

  1. MinGW won't install on my Mac. What's wrong?
    MinGW is not a Mac application, so you shouldn't run it on your Mac (even if you could get it to go). It is a port of GNU tools specifically to Windows platforms. Mac and Linux both have native support for the GNU tools, so no port is necessary (see below).
  2. How do I install the software on Mac/Linux?
    First a caveat: Platforms other than Windows are not 'officially' supported. That said, we will do our best to ensure that you can work on the other two popular operating systems. On any operating system you need the following software for this course:
    1. A Java runtime environment (JRE). You can get this from Apple http://support.apple.com/downloads/#macosandsoftware and look for "Java for Mac".
    2. The GNU C++ compiler (gcc). On Windows this is what you get from MinGW. On Linux this is almost certainly already installed on your system, if not it is certainly available with the distribution. On Mac it is installed as part of the "Development Tools" (Xcode), which are either available on the OS install disks that came with your Mac or can be downloaded from Apple. You may need to register for Apple Developer Connection to get the latest download, but it's free so why not.
      Note: Depending on which version of Xcode you're using, you may need to take an extra step to get the versions of gcc and g++ that we use: start Xcode and select Xcode -> Preferences; in that dialog select the download tab and choose "Command line tools" and select install.
    3. The Eclipse IDE for C/C++ developers, available at http://www.eclipse.org/downloads/.
    4. The Teaching Machine (optional). This has been developed at Memorial specifically for courses such as 1020 and is available at http://www.engr.mun.ca/~theo/TM/index.html. After you have installed the Teaching Machine, install the Teaching Machine plug-in Eclipse.
    See how to install on OSX for more detailed steps.
  3. The course notes don't display properly on a MAC . What can I do?
    We don't support Safari. Install the free Firefox browser instead (and make sure the JRE-the Java Runtime Engine is installed as well). Get Firefox!
  4. (On Windows) My project builds ok but when I run it there is no output.?
    There is an issue with how the compiler is working on some versions of Windows and MinGW. To fix this, in eclipse select the project and Project -> Properties, then in that dialog (as illustrated below) set the linker flags to -static-libstdc++.
  5. In the Mac Install How-to, I don't understand about using the terminal?
    There are lots of online sources that can help with this, for example: How to Use Basic UNIX Commands to Work in Terminal on Your Mac. In short, you need to use the cd command to change directory to the appropriate working directory and then type the commands as indicated in the instructions. For example (in this the stuff in italics is what you type):
    MacPeters2:~ dpeters$ pwd
    MacPeters2:~ dpeters$ cd Downloads/libpololu-avr
    MacPeters2:libpololu-avr dpeters$ sudo make install
    Note that using sudo will require that you enter your (mac) password and when you type this it is not echoed to the terminal, so it will look like you aren't able to type. Just type the password blindly and press return.



  1. I've discovered a mistake in my assignment submission after I submitted it, how can I fix the submitted version?
    You can simply submit a new (corrected) version. Before the deadline you can submit as often as you like -- we only see the last version submitted.
  2. Can we submit the assignment from home or does it need to be sent from a computer in the lab?
    You can submit from anywhere you have access to the web.
  3. I have been working on my programming assignment and have submitted 3 assignments to web submit after finding that there were errors in the first 2. Is there a way that I can delete the first 2 submitted assignments to ensure that only the third and final assignment will be marked?
    WebSubmit replaces your older versions each time you submit. So, we only get the last version.
  4. I have submitted my assignment three times but when I checked it on webSubmit using the View Submissions, I can't see anything. It works fine for my friends. What's wrong with my account? WebSubmit uses your section number and your username to store accounts. This happens because you are trying to view your submissions using a different username or a different section from the ones you used when you submitted the assignment.
  5. I have real problems remembering the cryptic password provided by webSubmit. When I change it it seems to work for a while but it's gone on my next session. Password changing is not really available to students. CCAE doesn't trust students to use good passwords.



  1. When I try to compile I get an error message "cannot open output file name.exe: Permission denied", what's wrong?
    Most likely that means you are currently running (executing) name.exe. In the console pane of Eclipse, click the button labeled "Select console" to see if there are any in which the "Terminate" button is red. If it is, click the "Terminate" button.
  2. When I try to run I get an error message "no binaries" or "binary not found", what's wrong?
    In order for the run button to work two things have to be true:
    1. The executable (a.k.a. binary) needs to be built. To start the build you need to click on the build button (). To see if it is successful, look in the console pane: if all went well the last couple of lines should look like
      Build complete for project A1
      Time consumed: 703  ms.  
      If you don't have something like that, then look at the error message to see what went wrong. If you get something like "Nothing to build" then Eclipse either thinks it's already built successfully, in which case you can force a rebuild by the "Project -> clean" menu item, or it doesn't know what project to build, so you need to select the project. Another common problem is that the wong toolchain is associated with the project -- see the next question and answer below.
    2. Eclipse needs to know where to find the executable. Usually Eclipse is pretty good about figuring out which executable to run, but sometimes it doesn't. You can explicitly tell it where to find the binary using the "Run -> Open run dialog ..." menu item. Select the "New configuration" button, fill in a name, browse for the project and click "Search application" to find the executable.
  3. When I try to build I get an error message "Cannot run program "make": Launching failed". That is probably because you have the wrong toolchain selected for the project. When the project is created it is important to select "MinGW GCC" toolchain on Windows, or "MACOSX GCC" on Mac, in the project creation wizzard, as on the right below:
  4. I fixed the error flagged in my file when I tried a build but I get the same error. Did you save the file after fixing the error? Look up at the tab at the top of the file being edited which contains the name of the file. If there is an asterisk in front, e.g. *assign1.cpp, you didn't save the file before building. Building does not automatically force a file save.
  5. I created a new project for my assignment and then copied and pasted the assign1.h file to the folder but it is not showing up in the Eclipse Project Explorer pane. Click on the project folder and hit F5 to refresh the list and you should see the new file show up.



  1. Will the exam/mid-term be computer based?
    No. The exam and mid-term will be written on paper.
  2. What notes/textbook sections are covered for the mid-term?
    Lectures up to and including Feb. 14 are included. So, in the notes everything up to and including the page titled "While loops" is included. I haven't been following the textbook strictly, but here are the sections that relate to the topics we've covered:
    Ch 1: 1.1, 1.2, 1.4, 1.5, 1.6
    Ch 2: all except 2.7
    Ch 3: 3.1-3.5
    Ch 4: all except 4.8, omit the string stuff.
    Ch 5: 5.1, 5.2, 5.4, 5.6.
  3. What will the mid-term be like?
    Previous mid-terms are posted. It's a good bet that ours will be similar.