Visual C++ 5 for Dummies

Visual C++ 5 for Dummies



Temporarily Out of Stock Online

Eligible for FREE SHIPPING


Visual C++ 5 for Dummies by Michael Hyman, Robert Arnson, Bob Arnson

Visual C++ 5 For Dummies is all you need to find out about this complex programming language and its quirks, rules, and confusing terms. Whether you're a brand new programmer or have been using BASIC, COBOL, Pascal, or C, you'll soon understand what all that jargon means so that you can create your own applications -- fast!

Inside, you'll find helpful advice on how to

  • Get the basics of C++ programming under your belt with a crash course in Visual C++ fundamentals
  • Create your first Visual C++ program in manageable parts
  • Find out about the concepts behind object-oriented programming so you know why you're doing what you're doing
  • Manage complicated projects by using the visual project window
  • Explore the Visual C++ development environment with its editors, wizards, compiler, and debugger
  • Master the Visual C++ utilities to make your life easier
  • Debug programs and correct syntax errors
  • Discover everything you need to know about C++ programming without the pain
  • Avoid common pitfalls with practical advice from expert authors

Product Details

ISBN-13: 9780764500596
Publisher: Wiley, John & Sons, Incorporated
Publication date: 05/28/1997
Series: For Dummies Series
Pages: 477
Product dimensions: 7.44(w) x 9.18(h) x 1.34(d)

Table of Contents


    So Is This Book about C++ or Visual C++?
    Why a Book For Dummies?
    Who This Book Is For
    How This Book Is Organized
    About the Disk
    Icons Used in This Book
    Why Is It Called C++?
Part I: Visual C++ in Ten Easy Chapters

    Chapter 1: What's in the Visual C++ Package?
    Sometimes Good Things Come in Small Packages
    A Compiler That Launched a Thousand Programs
    The Venus Fly Trap of Development: The Debugger
    Dialogs and Menus and Bitmaps, Oh My!
    2-4-6-8, How Do We Integrate?
    Building on a Powerful Framework
    You'll Never Pay an Overdue Fine at These Libraries
    Maxwell Smart Utilities
    The Environmentally Correct Way to Get Information
    Sample Programs to Get You Started

    Chapter 2: Installing Visual C++
    Do You Have Enough Free Space?
    Starting the Setup Program
    I Can Name That User in Three Notes
    The Typical Install (Or How to Fill a Disk in No Time)
    The Minimum Install
    The Bare-Bones Install (Requires the CD)
    The Personalized, Customized Install

      The "I won't be using MFC much or at all" install
      But I don't want any MFC!
      The "I won't be doing any database programming" install
      The "I don't need the Maxwell Smart utilities" install
      The "I don't need Books Online" install
      The "I don't need ActiveX controls" install
      Ready, set, go!
    But Wait! I Changed My Mind!
    What to Do If It Doesn't Install

    Chapter 3: Pulling Windows Programs Out of a Hat
    It's Time to Power Up Visual C++
    You May Ask Yourself, Well, How Did I Get Here?
    A Sneak Preview
    We're Off to See the Wizard
    Simply Wave the Magic Wand

      Step 1: Type of application
      Step 2: Database support
      Step 3: ActiveX support
      Step 4: Bells and whistles galore
      I've got the whole world in my hand
    I Want a Captivating Caption!
    But I Want It to Do Something!
    Let the Coding Begin
    Programs Like Us, Baby We Were Born to Run
    So What's Going On and What's Taking So Long?
    What to Do if You Get Errors
    What to Do if It Takes Forever to Compile

    Chapter 4: Bewitched by ClassWizard
    Having a Wizard at the Ready
    Wizards Are Always at the Top of the Class
    Glenda the Good Witch Will Help Change Your About Box
    Add Eye of Newt, Wing of Bat
    Abracadabra: A New Dialog Box
    Giving Your Dialog Box Some Class
    Want More Vegetables? Adding a New Menu Item
    Making Ends Meet: Hooking Up the New Dialog Box
    Encore! Encore! Run It Again
    Customizing Your Program

    Chapter 5: Don't You Want Some Project to Love?
    Why Bother?
    Happiness Is a Warm Project File
    Make Up Your Mind
    Creating a New Project

      Specifying details about the new project
      Adding files to the project
    Common Things to Do from the Workspace Window
    Find Out Who Is Depending on You
    Projections Look Good

    Chapter 6: All It Takes Is a Good Editor
    All the Code That's Fit to Edit
    Master of Editing Ceremonies
    Brought to You in Living Color
    Just Click Your Mouse One Time, Dorothy
    Seek and Ye Shall Find
    Don't Let Kids Play with Regular Expression Matches

    Chapter 7: A Compile's Just a Frown, Upside Down
    It's Hard to Get By with Just a Compile
    Blast! Syntax Errors
    Warning, Will Robinson
    If the Compiler Knows There's an Error, Why Doesn't It Just Correct It?
    If at First You Don't Succeed, Compile, Build, and Rebuild Again

    Chapter 8: Lots of Bugs and Kisses
    What's the Difference between a Syntax Error and a Bug?
    An Overview of the Debugging Process
    What's Your Name? Who's Your Debugger? Does It Look Like Me?
    Stop, in the Name of Bugs
    Stepping Into and Over, to Grandmother's House We Go
    Watching Out for Blunder One

      You gotta change your evil values, baby
      In a hurry? No problem!
      In an even bigger hurry?
    Wash That Bug Right out of Your Life
      Begin the buguine
      A whole lotta bugs
      Stop, programmer, what's that sound? Everybody look there's bugs around
      Are we there yet?
      There are still bugs
      Once more, for the Gipper
      Holy smokes, Batman, it works!
      One breakpoint, one watch, and we're clear
    Singing the Debugging Blues
    The Continuing Story of Debugalow Bill

    Chapter 9: Buying? Just Browsing
    You Want Me to Browse a Project?!
    Definitions and References: No Dictionary Required
    What Are Those Hieroglyphics?
    You're My Kind of Browser
    Putting the Browser within Reach
    Use the Source, Luke
    Browsing Your Family Tree
    Narrowing the Search
    Don't Go Away Mad -- Just Go Away
    Sometimes Things Don't Work

    Chapter 10: Consider All Options
    Options See, Options Do
    Changing It One File at a Time
    Give Me Two Options, and I'll Change Your World
    Be Friendly to the Environment

    Customize Your Toolbar and Call Me in the Morning
Part II: Everything You Wanted to Know about C++, but Were Afraid to Ask

    Chapter 11: Get with the Program
    Programs Start on Main Street and Keep Going
    Look for It in the Library
    How Do I Figure Out What to Do in My Program?
    Reading through That Jukebox Program

    Chapter 12: An Introduction to Object-Oriented Programming
    How Does Object-Oriented Programming Work?
    That's All?
    More on Encapsulation
    More on Inheritance
    More on Polymorphism

    Chapter 13: The Programming Parts Department
    What Do I Put in a Source File?
    Start at the Very Beginning
    See Me. Hear Me. Touch Me. Print Me.
    What's My New Line?
    The Original Cin
    Color Commentary
    Borrowing a Function from a Library
    At Last: Hello World
    Do It to It with Visual C++

    Chapter 14: It Takes All Types of Data
    I Do Declare a Variable's Type
    The Elemental Data Types
    Data Types That Are Shy
    Type Safety (Automatic Programming Goggles and Hard Hats)
    Some Things Never Change: Constants
    It's Music to My Eyes

    Chapter 15: These Variables They Are A-Changin'
    It's Even Easier Than Naming a Child
    Defining Variables
    Initializing Variables

    Chapter 16: Structures: Building Blocks for Variables
    Declaring Structures
    Using Those Marvelous Structures
    Building Big Structures from Little Structures
    I've Got Music on My Mind
    Aren't Structures Cool?

    Chapter 17: Making a Good First Expression
    Smooth Operators
    We Don't Care, We Don't Have To (At Least for Now)

      More on the ++ operator
      More on the >> operator
      More on the << operator
    On and Off Again with Boolean Expressions
    Your Assignment, Should You Choose to Accept It
    Who Canst Thus Express a Flowery Program More Complexly Than Our Line
    All the Lonely Operators
    Operator and a Haircut: Two Bits
    If You Think I'm Nerdy
    I Call These Operators to Order
    Here Are Some Operator Examples

    Chapter 18: Go with the Flow
    The Big Three Keywords: if, for, and while

      If I were a rich man: the if keyword
      I can C++ for miles and miles
      Here's a simple for example
      Crimson and clover, over and over
      While you were out: the while keyword
    Probably a Homework Problem: Factorial
    Flow, Flow, Flow Your Keywords
      The switch, case, and break keywords
      Do (wah diddy diddy dum diddy do): The do keyword
      Go to programming jail, with the goto keyword

    Chapter 19: A Better Jukebox Application
    How It Works
    Here's the Jukebox Code Just a Walking Down the Street

    Chapter 20: Play That Function Music Right, Boys
    First, Some Opening Statements
    Conjunction Junction, Making Functions
    Arguments (Yes. No. Yes. No.)
    Return of the Jedi (Or Maybe Not)
    Revisiting the Factorial Example
    Reading Programs That Contain Functions
    Variables and Name Scope
    Always Look for the Silver Inlining
    But First, Some Information on Storing Information

      Storing information in RAM
      Storing information in CPU registers
      Storing information in the instruction cache
      And how that all relates to function calls
      And now back to inlining
    Recursion . . . Recursion . . . Recursion . . .
    Connect the Dots
    Hey, It's Not My Default

    Chapter 21: Pointer Me in the Right Direction
    I Can't Believe I've Already Used Them!
    I'm Pointing and I Can't Get Up

      Double, double, value and address trouble
      Tomb of the unnamed memory
    A Specific Pointer Example
    How to Use Pointers with C++
    Address Books for Programs
    Can I Check Your Dereferences?
      A simple program that dereferences pointers
      The code
    Changing the Value of What You're Pointing At
    Changing the Value in a Structure
    A Notation Shortcut You See Everywhere
    If You Only New What I New
    If You Forget This, You Lose Your Memory
    A Classic Program: The Linked List Example
      How it works
      The code
    Free at Last
    Ignore This and You GP Fault
    Whose GP Fault Is It, Anyway?
    Stringing Us Along
    Avoid the Void*
    Some Simple Pointers
    Give Yourself a Pointer on the Back

    Chapter 22: An Even Louder Jukebox
    How It Works
    New and Improved Asbury Jukebox Code

    Chapter 23: Everyone Deserves Arrays (And Enumeration Types)
    How Do I Use Enums? Let Me Count the Ways . . .

      Safety in enumbers
      A cin of omission
    Up, Up, and Arrays
    Element Array, My Dear Watson
    Initializing Arrays
    Now Is the String of Our Discontent, Arrays and Come Away
    A Dr. Lizardo Special: Multidimensional Arrays
      I now declare you a multidimensional array
    These Aren't Your Average Everyday Tips; They're Multidimensional Tips

    Chapter 24: A Jukebox Hero
    Changes Required to Use Arrays
    Other Changes to the Program
    And Now for the Code

    Chapter 25: And You Thought Scope Was Just a Mouthwash
    Why Bother Talking about This?
    Scoping Rules: When Is ARose Not ARose?
    Coping with Scoping
    The Scoop on Scope

Part III: And Now for Something Completely Object Oriented

    Chapter 26: Through the Looking Class
    Welcome to Classroom 101

      Data members
      Member functions
      Declaring a class
      Restricting access
      Protected access
      How to make a read-only variable
      Defining member functions
    Now How Do I Put These Classes to Use?
      Accessing class members
      Accessing members from member functions
    Go to the Head of the Class
    Object-Oriented Thinking about Music
    Time to Review, Class

    Chapter 27: Boa Constructors and Boa Destructors
    A Constructor a Day Keeps the Disk Doctor Away

      Multiply your fun with multiple constructors
      Put the constructor John Hancock here
      Public and private lives of constructors
    Paranoia, Object Destroyer
      Cleaning up your own mess
      Remember to clean the dynamic stuff, too
    What Happens if I Have a Class in a Class?
    How to Read Object-Oriented Programs

    Chapter 28: Jukebox++
    The Classes in Jukebox
    So, What Else Is Going On?
    How the Linked List Works
    The Overall Flow
    It's Jukebox! It's Object Oriented! It's the Jukebox++ Code

    Chapter 29: Inheriting a Fortune
    Nothing Surpasses Reusable Classes
    Inherit This Way
    How Public, Private, and Protected Affect Things
    Overriding and through the Woods
    Getting the Most out of Your Parents
    No One Will Challenge This Inheritance
    This Is Important: How to Call Special Constructors in the Base Class
    I Call This Constructor and Destructor to Order
    This Is Also Important: Pointers and Derived Classes
    Inheriting from Private Benjamin

    Chapter 30: Those Virtuous Virtual Functions (Polymorphism Wants a Cracker)
    If I Never Use Pointers to Objects, Can I Skip This Chapter?
    How to Tell Whether You Need a Virtual Function
    Declaring a Virtual Function
    Don't Believe It until You C++ It
    Sign Up Here for Parenting Classes

    Chapter 31: Shirley Templates
    Join the Clean Template Club
    There's a Lot of Work on My Template
    Defining Member Functions for a Template
    Using Templatized Classes

      Rules for using pointers with templatized classes
      Reducing some of the confusion
      Stick it in a header file
    A Templatized Linked-List Program
    The Code

    Chapter 32: The Sound of Music, Continued
    How to Read a Program with Multiple Files
    What's Happening in This Program

      The FancyJukebox class
      The PreviewSongList class
      Mixing the objects in the linked list
      Store class declarations in the header files
    Finally, the Sample Program

    Chapter 33: Iostream Sundaes
    Instant File Access
    Some Other Things You Need to Know
    Five Facts on Files
    A Quick Example of Reading Numbers and Words
    The Code
    Special Things to Toss into a Stream
    Setting Fill and Width for Integers
    Row Your Boat, Gently Down the Iostreams

    Chapter 34: Too Hot to Exception Handle
    Error Handling the Old Way
    Error Handling the New, Improved Way
    I Polished the Exception Handling on the Big Front Door

      An exceptionally well-handled example
      Flexibility: Exception handling's middle name
    I Never Forget a Face, but in Your Case I'll Throw an Exception
    Just the Syntax, Ma'am
    It Looks Good, but That Type Stuff Is Confusing
    Look at an Example
    Inheriting from Error-Handling Classes
    Five Rules for Exceptional Success

    Chapter 35: Just a Jukebox of Rain (Well, Streams)
    The Input Files

    How It Works
      Using streams to read choices from disk
      The exception handling
    The Code

    Chapter 36: Take an Overload Off Sally (And Her Friends)
    Overloading a Member Function
    Overloading a Predefined Function
    These Operators Are Overloading, Captain

      Warning: This gets really complex
      Overloading inside or outside classes
      Put your overload in, put your overload out
      Put it in the class if possible
      The operator can't join the class if its lvalue isn't the class
      When some things are overloaded, they must be defined within the class
      Preserving commutativity in overloaded operators
      What you can't do
    Get by with a Little Help from Your Friends
      Here's what friends are for
      How to make friends and influence programs

    Chapter 37: Overloading Pandora's Jukebox
    How It Works
    The Code

Part IV: The Part of Tens

    Chapter 38: Ten Installation Problems and Solutions
    Not Enough Disk Space
    You Installed to the Wrong Drive
    You Can't Access the CD
    The Installation Program Behaves Strangely or Won't Run
    An Older Version of Visual C++ Runs Instead of the New Version
    There Aren't Any Icons for Visual C++
    My Project Up and Left Me
    You're Getting Messages about Not Enough Resources
    It Just Doesn't Work
    It Usually Works, but It Gives an Occasional GP Fault

    Chapter 39: Ten Syntax Errors
    Wrong Include Paths
    Missing ;
    Forgetting to Include a Header File
    Forgetting to Update the Class Declaration
    Using Class Name Instead of the Variable Name
    Forgetting ; after a Class Declaration
    Forgetting to Put public: in a Class Definition
    Forgetting a Variable's Name and Using the Wrong Name Instead
    Using -> When You Meant . (And Vice Versa)
    Missing a }

    Chapter 40: Ten More Syntax Errors
    Forgetting to End a Comment
    Using the Wrong Type for a Variable
    It Worked Just Fine as a C Program, but Now It Won't Compile
    Putting Nothing Instead of a Void
    Forgetting to Define Template Member Functions in the Header File
    Not Using a Public Constructor When You Need One
    Putting ; at the End of a #define
    Forgetting to Make a Project File
    You're Out of Disk Space
    Things Are Really Messed Up

    Chapter 41: Half of Ten Ways to Undo Things
    I Typed or Deleted Some Things in the Editor, but I Really Didn't Mean To
    Durn, I Didn't Mean to Change That Option
    Blast, I Saved a File by Mistake and It's Wrong
    My Windows Go off the Screen
    I Was Typing Away, Reached to Pop in a New CD Filled with Jammin' Tunes, and BOOM -- I Spilled Soda on My Hard Drive

    Chapter 42: There Must Be Ten Ways to Fix Your Crashing Programs
    You Forgot to Initialize a Variable
    You Used = Instead of ==
    You Used a Null Pointer
    Bad Pointers, Bad Pointers, What'cha Gonna Do When They Come for You?
    You Forgot to Dereference a Pointer
    You Forgot to Allocate Memory
    You Overran Allocated Memory
    You Ignored a Warning about No Conversion
    You Forgot the Break Statement in a Switch
    You Divided by Zero

    Chapter 43: Ten More Ways to Fix Your Crashing Programs
    You Forgot to Increment the Counter in a Loop
    You Changed the Increment Variable in a Loop
    Bad Bounds Check in a Loop
    You Used the Wrong Variable
    Bad Bounds for an Array
    [x,y] Is Not [x][y]
    Changing Variables out of Scope or Changing Globals
    You Did Windows Things inside a CWnd Constructor
    You Passed a Bad Parameter to Windows
    You Have a Bad Date/Time on a File

    Chapter 44: The Top Ten MFC Classes
    CWinApp: Giving Your App That Winsome Smile
    CWnd: Now You Cwnd, Now You Don't
    CDialog: Start Talking up a Storm
    CMDIFrameWnd: Windows for Multiple-Personality Applications
    CToolBar: More Power Tools
    CDialogBar: If Buttons Aren't Enough
    CStatusBar: Status Quo Vadis
    CDC: A Capitol Graphics Class
    CPen: Etch-a-Sketch, MFC Style
    CBitmap: Andy Warhol Does Windows

    Chapter 45: The Top Ten MFC Member Functions
    InitInstance: Get Started This Instant
    Create: Let There Be Modeless Windows
    DoModal: We Do It All the Time
    There's Something in the Way She Moves
    OnCreate: Create before You Leap
    EnableDocking: Jean-Luc Picard's Favorite Function
    OnPaint: Painting-by-Windows
    MoveTo: The Line Starts Here
    LineTo: And the Line Goes to Here
    TextOut: Officer Text Finishes a Message to Captain Kirk

    Chapter 46: Ten Cool Sample Programs

License Agreement
Installation Instructions
IDG Books Worldwide Registration Card

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews