Tutorial de java

Páginas: 6 (1253 palabras) Publicado: 5 de abril de 2011
Borland C++ Builder Tutorial
V22.0051 Fall 2002

1

Overview

Borland C++ Builder is a integrated development environment (IDE) used in all phases of C program development. Specifically, it “integrates” several of the programs used to develop C programs, including: • the text editor; • the C compiler; • the C preprocessor; • the linker; and • the debugger. Builder is designed to simplifythe development of large applications that involve elaborate graphical user interfaces. Unfortunately, this makes it somewhat less than ideal for the purposes of this course. We will be developing simple C programs that use a text based interface. Builder has many features that we will never use; but their presence makes Builder more complicated than necessary. This tutorial covers the minimumneeded for students to use Builder for their programming assignments. Often there is more than one way of doing something; in situations like this, this tutorial will only mention one (the simplest). The goal is too spend as little time as possible discussing the complexities of Builder so that we have more time to discuss the complexities of C programming. This is a “hands on” tutorial. To get themaximum value out of it, it is necessary to sit down in front of a PC, and go through it step by step.

1

2

Getting Started

Create a folder called CPrograms. This folder will contain all of the C programs that are written in this course. (It helps to be organized!) Students with their own PCs should create this folder on their hard drive. Students working in the Stern labs should usetheir personal network (H) drives. Students working in the ITS labs must use a floppy or ZIP diskette. Download the ZIP file found at the following location: http://cs.nyu.edu/~campbell/Tutorial.zip Extract the contents of the zip file into the CPrograms folder.

3

Building a Program

Start the Borland C++ Builder application. By default, a number of file windows will be opened. Close all of thesewindows by choosing the menu item File → Close All. Now open the file called Tutorial.c (this is one of the files contained in the ZIP archive). Choose the menu item File → Open . . . – a dialog box will appear. Select the folder CPrograms in the field labeled Look in:. Select the item C file (*.cpp,*.hpp,*.c,*.h). At this point, the dialog box should look like Figure 1. Select the file Tutorial.c andclick the Open button. A message box (Figure 2), asking if you wish for Builder to create a project, will appear. Builder, like most IDEs, requires a project1 to be created for each program being developed. Click Yes. An edit window (Figure 3) will appear. The file Tutorial.c contains the C source for a very simple program. The next step is to translate the C source file to an executable file – thisis called “building” the executable. Choose the menu item Project → Build Project. Building actually involves three distinct programs: the preprocessor, the compiler, and the linker. If any one of these programs detects an error in the C source program, building will come to an immediate halt, without producing an executable. The program in the Tutorial.c file contains two (intentional) compilererrors. The error messages produced by the compiler appear in a pane attached to the edit window (Figure 4). In some cases, but not all, the error will be obvious by examining the error message. Builder also highlights the line of the C source file where it detects the error. This is not necessarily the line where the error actually is; the only assumption that can be made is that the error is on orbefore this line.
Technically, a project is the complete catalogue of files and resources used in building an application. Fortunately, we do not need to know exactly what that means.
1

2

The first error in the program can be repaired by editing the line printf("I am a HAL Nine Thousand computer, Production Number "3.); so that it becomes printf("I am a HAL Nine Thousand computer,...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Tutoriales de java
  • Tutorial java
  • Tutorial Java
  • Tutorial java
  • Tutorial Java NetBeans
  • TUTORIALES JAVA EN ESPA OL
  • Tutorial dll en java
  • Tutorial de java 2

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS