ENGR 112 Lab: Sections 503, 504
TA: Brandon Paulson
Email: Brandon_Paulson@neo.tamu.edu
Office: RICH 911
Office Hours: MW 2:45-5:00 (RICH 911), T 5:00-6:00 (HRBB 232)
Lab Schedule:
503: TR 4:00-4:50
504: MW 10:00-10:50
Optional: MT 6:00-6:50
Course Web Page:
http://courses.cs.tamu.edu/daugher/cpsc121/06fall
Helpful Files:
Chrono.h
Chrono.cpp
FilledCircle.h
timer_example_windows.cpp
timer_example_linux.cpp
timer_example_unix.cpp
Sound Example (Windows only)
How to compile in UNIX:
http://students.cs.tamu.edu/bpaulson/lab/unix.html
Visual C++ Build Errors:
http://msdn2.microsoft.com/en-us/library/8x5x43k7.aspx
CSNet:
http://csnet.cs.tamu.edu/
Helpdesk Web Page:
http://helpdesk.cs.tamu.edu/
CS Webmail:
http://webmail.cs.tamu.edu/
General FAQs
1. Turn-in procedure for assignments.
2. Can I work on my assignments at home?
3. How can I access my H: drive from off-campus?
4. Why can't I access CSNet from off-campus?
6. Do I have to use Visual for my assignments or can I use another IDE?
7. How do I create a .zip file?
Visual C++ FAQs
1. "Fatal error C1083: Cannot open include file: 'std_lib_facilities.h': No such file or directory."
2. "MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup."
3. "Fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?"
4. My program builds correctly, but my console window keeps disappearing before I can see my output.
C++ Programming FAQs
Turn-in procedure for assignments.
All source code files need a header at the top which contains the following information: your name, section number, CS login name, date, and assignment. In addition,
it is also required that all code contain the academic integrity statement (with your handwritten signature) listed below.
Example:
/*
      hw#pr#.cpp
      Brandon Paulson
      ENGR 112-50x
      Due 11:59 P.M. Friday, Month Day, 2006
      In support of the Aggie Honor Code, I have neither given nor received any
      unauthorized help on this assignment.
*/
Before you turn in your code be sure you have this header and sufficient documentation throughout your code (yes, you can get points taken off for insufficient documentation).
All assignments must be turned in through CSNet. Assignments will NOT be accepted in any other form except for extreme circumstances. You should only submit your source code files
(i.e. your .cpp and .h files). Please do not submit your executable (.exe) files! If your program requires multiple source files then you will need to put all the files into a .zip file and submit it.
CSNet Turnin instructions can be found here.
http://helpdesk.cs.tamu.edu/docs/csnet_turnin
In addition to the electronic copy sent through CSNet, you will also need to submit paper copies of your code either in lab or during my office hours.
Back to top.
Can I work on my assignments at home?
YES. If you wish to work on assignments at home you can download a free copy of Visual C++ Express
at http://msdn.microsoft.com/vstudio/express/visualc/download/
Remember to also download and install the SDK that's listed on that site!
Back to top.
How can I access my H: drive from off-campus?
In order to gain access to files saved on your H: drive (your CS account), you will need to download an SSH client.
PuTTY is the most common client SSH and is installed in the CS Labs, however I recommend beginning users try another SSH Client which is more graphical and user-friendly.
The program I recommend can be downloaded here. http://ftp.ssh.com/pub/ssh/SSHSecureShellClient-3.2.9.exe
Once you have downloaded and installed the client you will have two programs - Secure Shell Client and Secure File Transfer Client. The Secure Shell Client will allow you
to connect to your H: drive through a UNIX environment. If you have UNIX knowledge you may wish to just use the SS Client to gain access to your files. If you do not
have UNIX experience then follow the steps below:
- Open Secure File Transfer Client (Start->Programs->SSH Secure Shell->Secure File Transfer Client)
- Click the "Quick Connect" button (or File->Quick Connect) and a pop-up box will ask for the following information:
- Host Name: sun.cs.tamu.edu
- User Name: [your CS username]
- Port Number: 22
- Authentication Method: Password
- Enter information above and click "Connect."
- A pop-up box should then appear asking for your password. Enter your CS password and click "OK."
- Once connected you should see your local computer's files in the left column and your H: drive files on the right.
- You can navigate through your folders on both sides and can drag-and-drop files from each side.
If you wish to try your luck with PuTTY, you can find more information here. http://helpdesk.cs.tamu.edu/docs/interactive_putty
NOTE: To access your "My Documents" folder from your H: drive you need to navigate through the following directories:
H:\ms_windows\cpsc_profile\My Documents
Back to top.
Why can't I access CSNet from off-campus?
CSNet is a local intranet that is blocked by Texas A&M's firewall. In order to gain access to CSNet, you must connect to A&M's network via a VPN client. Here you will find instructions on downloading
and setting up a VPN client so you can connect to CSNet. http://www.net.tamu.edu/network/vpn.html or http://helpdesk.cs.tamu.edu/docs/vpn
Back to top.
Do I have to use Visual for my assignments or can I use another IDE?
No. However, your assignments will be graded using Visual and there are times when IDE-specific errors occur (like "no newline at the end of file").
If you code encounters an IDE-specific error, you will have points deducted. If you choose to use a different IDE, it is highly recommended that you test your code on Visual first before turning it in.
Back to top.
How do I create a .zip file?
The easiest way is to right-click on your desktop (or in a folder) and go to New -> Compressed (zipped) Folder. Rename the zip file to whatever you want (i.e. assignment1.zip, etc.) and then drag all necessary files into the zip folder.
Back to top.
"Fatal error C1083: Cannot open include file: 'std_lib_facilities.h': No such file or directory."
This error will occur when the std_lib_facilities.h file is located in an incorrect directory or does not exist at all. This file can be downloaded from the course webpage. The easiest way to use this file is to right-click the link on
the course webpage and go to "Save Link As..." When the dialog box comes up, save the file to
C:\Documents and Settings\[your username]\My Documents\Visual Studio 2005\Projects
If you save the file in this location, then at the top of your source code you will want to include the file using
#include "..\..\std_lib_facilities.h"
Note: The "..\..\" means "move up two directories." Let's say you have a Visual Project called "HelloWorld" and the .cpp file is located in the following directory:
C:\Documents and Settings\[your username]\My Documents\Visual Studio 2005\Projects\HelloWorld\HelloWorld
using ..\..\ will move us up two directories into the "Projects" folder, which happens to be the location where you saved the std_lib_facilities.h file.
Back to top.
"MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup."
This error will occur if you specified the template of your project to be a Win32 Project instead of a Win32 Console Application. To fix this, create a new project and be sure to specify the template to be a Win32 Console Application.
Also, remember to check the "Empty Project" checkbox when the Application Settings popup comes up.
Note: you can also fix this problem within your project by going to Project -> [your project] Properties -> Configuration Properties ->
Linker -> System and changing the SubSytem setting to "Console (/SUBSYSTEM:CONSOLE)."
Back to top.
"Fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?"
This error will occur if you forgot to check the "Empty Project" checkbox in the Application Settings when setting up your new project. To fix this, create a new project, specify the template to be a Win32 Console Application,
and remember to check the "Empty Project" checkbox when the Application Settings popup comes up.
Back to top.
My program builds correctly, but my console window keeps disappearing before I can see my output.
If this occurs, you may want to add the following line of code to your .cpp file, just before the return 0; statement.
keep_window_open();
Back to top.
Last updated: 9/3/06