csci n305 c language programming n.
Skip this Video
Loading SlideShow in 5 Seconds..
CSCI N305 C Language Programming PowerPoint Presentation
Download Presentation
CSCI N305 C Language Programming

Loading in 2 Seconds...

play fullscreen
1 / 20

CSCI N305 C Language Programming - PowerPoint PPT Presentation

  • Uploaded on

CSCI N305 C Language Programming. Welcome to CSCI N305! Compiling Your First Program Using Microsoft Visual Studio 2008. Objectives for the Lab. Learn the difference between client-side and server-side programming Learn how to open an empty solution and project under Visual Studio .Net

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'CSCI N305 C Language Programming' - enya

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
csci n305 c language programming

CSCI N305C Language Programming

Welcome to CSCI N305!

Compiling Your First Program Using Microsoft Visual Studio 2008

objectives for the lab
Objectives for the Lab
  • Learn the difference between client-side and server-side programming
  • Learn how to open an empty solution and project under Visual Studio .Net
  • Compile and run a simple program
client side vs server side compiling
Client-side vs Server-side compiling
  • Environment setup
    • Install MS VS .Net 2008 from
  • Client-side compiling runs locally on your computer
    • Requires installation of a compiler on your system
    • Consumes local CPU and hard disk space
    • No network (internet) connectivity required
  • Service-side compiling runs remotely on a server
    • Requires remote access software such as SSH available from
    • Server is typically more powerful CPU and has more storage.
    • Typically used for larger projects
    • Easier to implement team development environment
    • Normally uses a command line interface rather than graphical
    • Network (internet) connectivity required
    • Used for business applications that require production infrastructure (production monitoring, nightly backups, etc.)
start microsoft visual studio 2008
Start Microsoft Visual Studio 2008
  • Start → All Programs → Microsoft Visual Studio 2008 → Microsoft Visual Studio 2008
starting for the first time
Starting for the first time
  • The first time you run MSVS, you might get a window like this.
  • Set Visual C++ Development Setting as your default environmental settings.
  • Use General Development Settings if you have no preference.
initial msvs window
Initial MSVS Window
  • Here is an image of the initial window.
opening a new project
Opening a New Project
  • Open a project using File → New Project → Visual C++ → Win32 → Win32 Console Application → enter your project name and browse to select a location (where your project will be saved) → OK.
project settings
Project Settings
  • Choose Next > at this dialog.
project settings continued
Project Settings (continued)
  • Be sure to check Empty project and Finish.
add a new item
Add a New Item
  • Right-click on Source Files and Add a New Item.
create a c file
Create a .c File
  • Choose Visual C++ Code, C++ File, enter a file name with .c as the file extension.
enter code into your file
Enter Code into Your File
  • Enter a standard C program into the .c file.
save and compile your program
Save and Compile Your Program
  • Save → Build → Build Solution
save and compile your program2
Save and Compile Your Program
  • An unsuccessful build, read the error message and correct the errors and build again:
run the program
Run the Program
  • After a successful build, Debug →Start Without Debugging to run the program:
run the program1
Run the Program
  • Examine the output:
  • You created a new Microsoft Visual Studio 2008 Project.
  • Selected Visual C++ Win32 Console Application.
  • Created your own .c file, entering code just like in class.
  • Ran your program to produce output.
  • You did all of this using an easy editor without logging onto the internet.
open an existing program
Open an Existing Program

If your project is named projectOne:

  • Find the projectOne folder at the location where you saved your project.
  • In the projectOne folder, double click on the file projectOne.vcproj, or projectOne.sln.
  • Double click on the .c file (e.g. main.c) will only open up the code file. It will not let you compile or run the program using Visual Studio 2008.
submit a program
Submit a Program

You only need to submit the .c file.