การตั้งค่าให้ Borland C++ Compiler 5.5 ทำงานร่วมกับ EditPlus เพื่อ

Download Report

Transcript การตั้งค่าให้ Borland C++ Compiler 5.5 ทำงานร่วมกับ EditPlus เพื่อ

4122202 โครงสร ้างข้อมู ล(Data
้ าให้ Borland
Structure)
การตังค่
C++
Compiler 5.5 ทางาน
่ า
ร่วมกับ EditPlus เพือท
่ ยน
การ Compile ไฟล ์ทีเขี
้ วยภาษา C++
ขึนด้
นายกฤษณ์ ช ัยวัณณคุปต ์
[email protected]
โปรแกรมวิชาคณิ ตศาสตร ์และ
คอมพิวเตอร ์
คณะวิทยาศาสตร ์และเทคโนโลยี
มหาวิทยาลัยราชภัฏอุตรดิตถ ์
www.sci.uru.ac.th
่ ้องใช ้
โปรแกรมทีต
1. Borland C++ Compiler 5.5
สามารถดาวน์โหลด Borland C++ Compiler 5.5 ซึง่
่ freecommandLinetools จากเว็บไซต ์
อยู ่ในชือ
Borland http://www.borland.com
2. EditPlus
สามารถดาวน์โหลด EditPlus จากเว็บไซต ์ EditPlus
http://www.editplus.com/
© 2007 Mathematics and Computer Program, Faculty of Science and Technolo
้
ติ
ด
ตั
ง
Borland C++ Compiler
www.sci.uru.ac.th
5.5
 ติดตง้ั Borland C++ Compiler 5.5 โดย Double
่ วติดตัง้ แล้วกดปุ่ ม Next จนกระทังเสร็
่
้ จึง
Click ทีตั
จสิน
กดปุ่ ม OK
© 2007 Mathematics and Computer Program, Faculty of Science and Technolo
www.sci.uru.ac.th
ติดตัง้ EditPlus
่ วติดตัง้ แล้วกด
 ติดตง้ั Edit Plus โดย Double Click ทีตั
่
้ จึงกดปุ่ ม OK
ปุ่ ม Setup จนกระทังเสร็
จสิน
© 2007 Mathematics and Computer Program, Faculty of Science and Technolo
www.sci.uru.ac.th
่ าหร ับ Compile
สร ้างคาสังส
Program
 เปิ ด EditPlus เลือกเมนู Tools > Configure User
Tools
© 2007 Mathematics and Computer Program, Faculty of Science and Technolo
www.sci.uru.ac.th




่ าหร ับ Compile
สร ้างคาสังส
Program
กดปุ่ ม Group Name…
้ั อว่
่ า Borland C++
ตงชื
กดปุ่ ม Add Tool >> Program
้ อว่
่ า Compile
ในช่อง Menu Text: ตังชื
© 2007 Mathematics and Computer Program, Faculty of Science and Technolo
www.sci.uru.ac.th
่ าหร ับ Compile
สร ้างคาสังส
Program
 ในช่อง Command: กดปุ่ ม Browse เลือกไฟล ์
่
bcc32.exe ซึงอยู
่ในโฟล ์เดอร ์
C:\Borland\BCC55\Bin\
 ในช่อง Argument: พิมพ ์ดังนี ้
-IC:\Borland\BCC55\Include LC:\Borland\BCC55\Lib -n$(FileDir) $(FilePath)
 ในช่อง Initial directory: พิมพ ์ดังนี ้
C:\Borland\BCC55\Bin
่
 ทาเครืองหมายถู
กที่ Capture output
 กดปุ่ ม Apply
© 2007 Mathematics and Computer Program, Faculty of Science and Technolo
www.sci.uru.ac.th
่ าหร ับ Compile
สร ้างคาสังส
Program
© 2007 Mathematics and Computer Program, Faculty of Science and Technolo
www.sci.uru.ac.th







่ าหร ับ Run Program
สร ้างคาสังส
กดปุ่ ม Add Tool >> Program
้ อว่
่ า Run
ในช่อง Menu Text: ตังชื
ในช่อง Command: พิมพ ์ดังนี ้ $(FileNameNoExt)
ในช่อง Argument: เว้นว่างไว้
ในช่อง Initial directory: พิมพ ์ดังนี ้ $(FileDir)
่
ทาเครืองหมายถู
กที่ Capture output
กดปุ่ ม OK
© 2007 Mathematics and Computer Program, Faculty of Science and Technolo
www.sci.uru.ac.th
่ าหร ับ Run Program
สร ้างคาสังส
© 2007 Mathematics and Computer Program, Faculty of Science and Technolo
www.sci.uru.ac.th
ทดสอบการ Compile และ Run
Program
 เลือกเมนู File > New > C/C++ จะปรากฏ Code ดัง
ภาพขวาบน
 แก้ไข Code ให้เป็ น Syntax ของภาษา C++ ดังภาพ
ขวาล่าง
© 2007 Mathematics and Computer Program, Faculty of Science and Technolo
www.sci.uru.ac.th
ทดสอบการ Compile และ Run
Program
 บันทึกไฟล ์ แล้วทาการ Compile โดยเลือกเมนู Tools
> Compile หรือกดปุ่ ม Ctrl+1 จะปรากฎผลลัพธ ์ดัง
ภาพ
---------- Compile ---------Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
C:\BCC\test.cpp:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Output completed (0 sec consumed) - Normal Termination
© 2007 Mathematics and Computer Program, Faculty of Science and Technolo
www.sci.uru.ac.th
ทดสอบการ Compile และ Run
Program
 ทาการ Run โดยเลือกเมนู Tools > Run หรือกดปุ่ ม
Ctrl+2 หากปรากฏผลลัพธ ์ดังภาพ แสดงว่าเรา
่
กาหนดค่าต่างๆ ได้ถูกต้องพร ้อมทีจะท
างานได้แล้ว
---------- Run ---------Hello, world
Output completed (0 sec consumed) - Normal Termination
© 2007 Mathematics and Computer Program, Faculty of Science and Technolo
www.sci.uru.ac.th
เว็บไซต ์อ ้างอิง
 Ford AntiTrust’s Blog
http://www.thaicyberpoint.com/ford/blog/
© 2007 Mathematics and Computer Program, Faculty of Science and Technolo