Ivor Horton's Beginning Visual C++ 2012
eBook - ePub

Ivor Horton's Beginning Visual C++ 2012

Ivor Horton

Compartir libro
  1. English
  2. ePUB (apto para móviles)
  3. Disponible en iOS y Android
eBook - ePub

Ivor Horton's Beginning Visual C++ 2012

Ivor Horton

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

The only book to teach C++ programming with Microsoft Visual Studio!

There's a reason why Ivor Horton's Beginning Visual C++ books dominate the marketplace. Ivor Horton has a loyal following who love his winning approach to teaching programming languages, and in this fully updated new edition, he repeats his successful formula. Offering a comprehensive introduction to both the standard C++ language and to Visual C++, he offers step-by-step programming exercises, examples, and solutions to deftly guide novice programmers through the ins and outs of C++ development.

  • Introduces novice programmers to the current standard, Microsoft Visual C++ 2012, as it is implemented in Microsoft Visual Studio 2012
  • Focuses on teaching both the C++11 standard and Visual C++ 2012, unlike virtually any other book on the market
  • Covers the C++ language and library and the IDE
  • Delves into new features of both the C++11 standard and of the Visual C++ 2012 programming environment
  • Features C++ project templates, code snippets, and more

Even if you have no previous programming experience, you'll soon learn how to build real-world applications using Visual C++ 2012 with this popular guide.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Ivor Horton's Beginning Visual C++ 2012 un PDF/ePUB en línea?
Sí, puedes acceder a Ivor Horton's Beginning Visual C++ 2012 de Ivor Horton en formato PDF o ePUB, así como a otros libros populares de Informatik y Programmierung in C. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Editorial
Wrox
Año
2012
ISBN
9781118417034
Edición
1
Categoría
Informatik

Chapter 1
Programming with Visual C++

WHAT YOU WILL LEARN IN THIS CHAPTER:
  • What the principal components of Visual C++ are
  • What solutions and projects are and how you create them
  • About console programs
  • How to create and edit a program
  • How to compile, link, and execute C++ console programs
  • How to create and execute basic Windows programs
WROX.COM CODE DOWNLOADS FOR THIS CHAPTER
You can find the wrox.com code downloads for this chapter on the Download Code tab at www.wrox.com/remtitle.cgi?isbn=9781118368084. The code is in the Chapter 1 download and individually named according to the names throughout the chapter.

LEARNING WITH VISUAL C++

Windows programming isn’t difficult. Microsoft Visual C++ makes it remarkably easy, as you’ll see throughout the course of this book. There’s just one obstacle in your path: Before you get to the specifics of Windows programming, you have to be thoroughly familiar with the capabilities of the C++ programming language, particularly the object-oriented capabilities. Object-oriented techniques are central to the effectiveness of all the tools provided by Visual C++ for Windows programming, so it’s essential that you gain a good understanding of them. That’s exactly what this book provides.
This chapter gives you an overview of the essential concepts involved in programming applications in C++. You’ll take a rapid tour of the integrated development environment (IDE) that comes with Visual C++. The IDE is straightforward and generally intuitive in its operation, so you’ll be able to pick up most of it as you go along. The best way to get familiar with it is to work through the process of creating, compiling, and executing a simple program. So power up your PC, start Windows, load the mighty Visual C++, and begin your journey.

WRITING C++ APPLICATIONS

You have tremendous flexibility in the types of applications and program components that you can develop with Visual C++. Applications that you can develop fall into two broad categories: desktop applications and Windows 8 apps. Desktop applications are the applications that you know and love; they have an application window that typically has a menu bar and a toolbar and frequently a status bar at the bottom of the application window. This book focuses primarily on desktop applications.
Windows 8 apps are different from desktop applications. They have a user interface that is completely different from desktop applications. The focus is on the content where the user interacts directly with the data, rather than interacting with controls such as menu items and toolbar buttons.
Once you have learned C++, this book concentrates on using the Microsoft Foundation Classes (MFC) with C++ for building desktop applications. The application programming interface (API) for Windows desktop applications is referred to as Win32. Win32 has a long history and was developed long before the object-oriented programming paradigm emerged, so it has none of the object-oriented characteristics that would be expected if it were written today. The MFC consists of a set of C++ classes that encapsulate the Win32 API for user interface creation and control and greatly eases the process of program development. You are not obliged to use the MFC, though. If you want the ultimate in performance you can write your C++ code to access the Windows API directly, but it certainly won’t be as easy.
Figure 1-1 shows the basic options you have for developing C++ applications.
image
FIGURE 1-1
Figure 1-1 is a simplified representation of what is involved. Desktop applications can target Windows 7, Windows 8, or Windows Vista. Windows 8 apps execute only with Windows 8 and you must have Visual Studio 2012 installed under Windows 8 to develop them. Windows 8 apps communicate with the operating system through the Windows Runtime, WinRT. I’ll introduce you to programming Windows 8 applications in Chapter 18.

LEARNING DESKTOP APPLICATIONS PROGRAMMING

There are always two basic aspects to interactive desktop applications executing under Windows: You need code to create the graphical user interface (GUI) with which the user interacts, and you need code to process these interactions to provide the functionality of the application. Visual C++ provides you with a great deal of assistance in both aspects. As you’ll see later in this chapter, you can create a working Windows program with a GUI without writing any code at all. All the basic code to create the GUI can be generated automatically by Visual C++. Of course, it’s essential to understand how this automatically generated code works because you need to extend and modify it to make the application do what you want. To do that you need a comprehensive understanding of C++.
For this reason you’ll first learn C++ without getting involved in Windows programming considerations. After you’re comfortable with C++ you’ll learn how to develop fully fledged Windows applications. This means that while you are learning C++, you’ll be working with programs that involve only command line input and output. By sticking to this rather limited input and output capability, you’ll be able to concentrate on the specifics of how the C++ language works and avoid the inevitable complications involved in GUI building and control. Once you are comfortable with C++ you’ll find that it’s an easy and natural progression to applying C++ to the development of Windows application programs.
NOTE As I’ll explain in Chapter 18, Windows 8 apps are different. You specify the GUI in XAML, and the XAML is used to generate the C++ program code for GUI elements.

Learning C++

Visual C++ supports the C++ language defined by the most recent ISO/IEC C++ standard that was published in 2011. The standard is defined in the document ISO/IEC 14882:2011 and commonly referred to as C++ 11. The Visual C++ compiler does not support all the new language features introduced by this latest standard, just some of the most commonly used features, but it will surely be extended over time. Programs that you write in standard C++ can be ported from one system environment to another reasonably easily, although the library functions that a program uses — particularly those related to building a graphical user interface — are a major determinant of how easy or difficult it will be. ISO/IEC standard C++ is the first choice of a great many professional program developers because it is so widely supported, and because it is one of the most powerful programming languages available today.
Chapters 2 through 9 of this book teach you the C++ language and introduce some of the most commonly used C++ standard library facilities along the way. Chapter 10 explains how you can use the Standard Template Library (STL) for C++ for managing collections of data.

Console Applications

Visual C++ consol...

Índice