Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
C++ Application Development with Code::Blocks

You're reading from   C++ Application Development with Code::Blocks Using Code::Blocks it's possible for C++ developers to create application consistency across multiple platforms. This book takes you through the process from installation to implementing advanced features, all with a user-friendly approach.

Arrow left icon
Product type Paperback
Published in Oct 2013
Publisher
ISBN-13 9781783283415
Length 128 pages
Edition Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
BIPLAB MODAK BIPLAB MODAK
Author Profile Icon BIPLAB MODAK
BIPLAB MODAK
Arrow right icon
View More author details
Toc

Creating your first app with Code::Blocks


Let's write a simple Hello World app, which essentially prints out "Hello World" to console. Launch Code::Blocks to begin and as shown in the following screenshot click on the new button in main toolbar and then click on the File menu option. The following screenshot represents the same:

Click on the C/C++ source option in the next window and then on the Go button. A wizard will be presented. Click on the Next button on the first page of the wizard. Choose the C++ option and click on the Next button. Choose file path and name in the next window and click on the Finish button to complete wizard.

Then type the following code in the editor:

#include <iostream>

int main() {
  std::cout << "Hello World!" << std::endl;
  return 0;
}

Code::Blocks will automatically add an empty line at the end of the file if there isn't any, this is a Code::Blocks feature. GCC expects an empty line at the end of source code, and it will throw warning if an...

You have been reading a chapter from
C++ Application Development with Code::Blocks
Published in: Oct 2013
Publisher:
ISBN-13: 9781783283415
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image