Wrox Programmer Forums
|
BOOK: Ivor Horton's Beginning Visual C++ 2005
This is the forum to discuss the Wrox book Ivor Horton's Beginning Visual C++ 2005 by Ivor Horton; ISBN: 9780764571978
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Ivor Horton's Beginning Visual C++ 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 18th, 2008, 11:16 PM
Registered User
 
Join Date: Oct 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error in Code

Error in Code page 216.

First code paragraph (on top), line 3 reads:
Console::WriteLine("Students with Grade {0}:", gradeLetter+j);

Should be
Console::WriteLine("Students with Grade {0}:", gradeLetter++);

Explanation:

Because of adding data type Int32 to a wchar_t, it is converted into number when padded to the string object. So grades appear as NUMBERS instead of letters. I posted this one year ago but surprised not see it listed yet!

Nad





Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Code Error rhapsidee VB.NET 2002/2003 Basics 1 May 27th, 2008 07:04 AM
Code error reverand Excel VBA 1 November 15th, 2006 02:08 AM
Code error??? emyr BOOK: Beginning Java 2 1 October 31st, 2006 05:47 PM
Code error!?!? Brian Campbell BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 3 November 26th, 2004 07:47 PM
Error displayed with error trap code stoneman Access 4 February 28th, 2004 02:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.