0% found this document useful (0 votes)
0 views39 pages

Comp Prog 2 - Lesson 3.2

Lesson 3.2 introduces Code::Blocks, a free, open-source IDE for C and C++ programming, detailing its features, user interface, and importance. It covers the various panels within the IDE, keyboard shortcuts for efficient coding, and the GNU General Public License that governs its use. The lesson emphasizes active participation and critical thinking in learning to program using Code::Blocks.

Uploaded by

Lito “KCIN”
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views39 pages

Comp Prog 2 - Lesson 3.2

Lesson 3.2 introduces Code::Blocks, a free, open-source IDE for C and C++ programming, detailing its features, user interface, and importance. It covers the various panels within the IDE, keyboard shortcuts for efficient coding, and the GNU General Public License that governs its use. The lesson emphasizes active participation and critical thinking in learning to program using Code::Blocks.

Uploaded by

Lito “KCIN”
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 39

Lesson 3.

2
Computer Programming 2
Good
Morning!
Open
Attendance
Review
What was our last lesson all about?
Lesson 3.2

What is
Code::Blocks
IDE
Objectives

identify what is explore the

01 Code::Blocks IDE
and its uses
02 functions of menus
and sub-menus
found in
Code::Blocks IDE

appreciate the
develop critical
03 importance of using
Code::Blocks as an
IDE for C++
04 thinking through
active participation
programming
What is
Code::Blocks IDE?
it is a free, open source, cross-
platform IDE that supports multiple
compilers. It is integrated with wide
variety of tools like text editor,
compiler, debugger and many
other tools, which essential for
creating any C and C++
Code: Blocks is geared toward the development
of C and C++ programs but it can also be used
for other programming languages, provided that
the respective SDK (Software Development
Kit) for that language is installed.

Code: Blocks is available for Windows, Linux,


and Mac OS, wherein one of the goals is to
provide a unified look across all three OSes.
Being open source, support and development
of Code::Blocks may not be as robust as retail
C/C++
IDEs such as Turbo C++ or Visual C++.
However, Code: Blocks has a strong user
base support and there should be no
shortage of additional tutorials written by the
user community.
Being open source, Code::Blocks uses the
GNU General Public License 3. This means
that you can use Code: Blocks to create
commercial applications.
The GNU General Public License 3 (GNU
GPL or simply GPL) is a series of widely used
free software licenses that guarantee end
users the four freedoms to run, study, share,
and modify the software.

The GNU License kicks in when you modify the


actual source code of Code::Blocks and its
related plug-ins and you will have to provide
the source code for those modifications.
GPLv3 is intended to protect and promote the
principles of free software, ensuring that users
have the freedom to use, modify, and share
software, while also protecting the rights of
developers and contributors.
In summary, while copyright grants creators
exclusive rights over their works, copyleft
uses copyright law to ensure that derivative
works of open-source software remain open
and freely available to others. Copyleft
licenses leverage copyright law to promote the
principles of openness, collaboration, and
freedom in the software development
community.
Getting Started with
Code::Blocks

Start
After installing Code:-Blocks, you
can run the application by
selecting the program. When the
program launches, you will see
the Code:Blocks IDE user
interface window on your screen.
After installing Code:-Blocks, you
can run the application by
selecting the program. When the
program launches, you will see
the Code:Blocks IDE user
interface window on your screen.
4 PANELS OF
CODE::BLOCKS
1. Management: This panel contains
the Projects tab which displays all open
projects. The management panel also has
a Symbols tab that shows symbols,
variables, etc., being used. The
Resources Tab can also be seen in this
panel.
After installing Code:-Blocks, you
can run the application by
selecting the program. When the
program launches, you will see
the Code:Blocks IDE user
interface window on your screen.
2. Editor: In the illustration above, you
can find the editor panel with the tab that
contains main.cpp. This is the place
where you type your code. If you notice,
the lines in the editor panel are marked
for easy reference.
After installing Code:-Blocks, you
can run the application by
selecting the program. When the
program launches, you will see
the Code:Blocks IDE user
interface window on your screen.
3. Logs & others: This window is used
to output search results and messages
from the compiler and debugger.
After installing Code:-Blocks, you
can run the application by
selecting the program. When the
program launches, you will see
the Code:Blocks IDE user
interface window on your screen.
4. Status Bar: The status bar can be seen at
the bottom of the Code: Blocks user interface.
It contains the following information:
• Absolute path of the file opened on the
editor, which can be seen as C:\C++)
Hellolmain.cp
• Default character encoding of the OS. This
can be seen as "default." The character
encoding as shown in the image is
WINDOWS-1252.
• Row and column of the current cursor position
in the editor panel. (Lines in the editor)
• Keyboard mode for inserting text (either Insert
or Overwrite)
• Current state of a file. If the project has been
modified, the word "Modified" will appear on the
status bar; if not, that area will be empty.
After installing Code:-Blocks, you
can run the application by
selecting the program. When the
program launches, you will see
the Code:Blocks IDE user
interface window on your screen.
Starting a C++
Program

Start
Let us begin creating our frst C++ Program by
following these simple instructions.

First, let us open Code:: Blocks. Once the IDE


has loaded, look at the menu and select

File › New › Project.


Keyboard
Shortcuts
Typing...
As a programming student, is
memorizing keyboard
shortcut in coding
necessary?
For Editing
FUNCTION SHORTCUT KEY

Undo last action Ctrl+Z

Redo last action Ctrl-Shift-Z

Swap header / source F11

Comment highlighted code Ctrl-Shift-C

Uncomment highlighted code Ctrl-Shift-X

Auto-complete / Abbreviations Ctrl-Space / Ctrl-J

Toggle bookmark Ctrl-B


For Files
FUNCTION SHORTCUT KEY

New file or project Ctrl+N

Open existing file or project Ctrl-O

Save current file Ctrl-S

Save all files Ctrl-Shift-S

Close current files Ctrl-F4 / Ctrl-W

Close all files Ctrl-Shift-F4 / Ctrl-Shift-W


For Building / Running

FUNCTION SHORTCUT KEY

Build Ctrl+F9

Compile current file Ctrl-Shift-F9

Run Ctrl-F10

Build and Run Ctrl-Shift-S

Rebult F9
Let’s sum it up!

What is What are the Some


Code::Bloc different keyboard
ks IDE? panels in shortcuts in
Code::Blocks Code::Blocks
? ?
Do you have
any
questions?
ACTIVITY
MIX and MATCH

Directions: Write the letter of the


menu in which the options in
column A fall under.
A B
1. New A. File
2. Full Screen B. Edit
3. Add Files C. View
4. Remove D. Search
Files E. Project
5. Save As F. Build
6. Comment G. Debug
7. Close All H. Tools
8. Run
9. Open...
10. Errors
Closing
Prayer

You might also like