Wrox Programmer Forums
|
Visual C++ 2005 For discussion of Visual C++ 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the 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 May 23rd, 2007, 09:00 AM
Registered User
 
Join Date: May 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Beginning Visual C++ 2005

Book Title: Beginning Visual C++ 2005
ISBN: 978-0-7645-7197-8
Platform: Visual C++ 2005 Pro SP1 for Vista

Problem: Ex2_03
I copied the code from the book exactly below is code in question:
Code:
// Ex2_03.cpp
// Exercising output
#include <iostream>
#include <iomainp>

using std::cout;
using std::endl;
using std::setw;

int main()
{
    int num1 = 1234, num2 = 5678;
    cout << endl;                                // Start on a new line.
    cout << setw(6) << num1 << setw(6) << num2;    // Output two values.
    cout << endl;                                // End on a new line.
    return 0;
}
but when i build the solution i get the following error:

Code:
Error    1  fatal error C1083: Cannot open include file: 'iomainp': No such file or directory    file Ex2_03.cpp    line 4
can anyone give me pointers as to where i am going wrong, any help is much appreciated.

Regards

Pendragon

 
Old June 3rd, 2007, 04:27 PM
Authorized User
 
Join Date: Dec 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I can see a typo in your code.

the header file you need to include for this exercise is called <iomanip>

not <iomainp> (or something like that...)

Charles






Similar Threads
Thread Thread Starter Forum Replies Last Post
Ivor Hortons Beginning Visual C++ 2005 Davel Visual C++ 2005 1 June 11th, 2008 08:45 AM
Beginning Visual c# 2005 - Chapter 15 help Lucy_H85 C# 2005 6 October 12th, 2007 09:05 AM
Ex 07 08 of Beginning Visual C++ 2005 ERROR stannizar BOOK: Ivor Horton's Beginning Visual C++ 2005 1 March 22nd, 2007 04:39 AM
FTP in Visual Studio 2005 Pro (Visual Basic) shoopes VB How-To 1 June 29th, 2006 02:08 PM
Beginning Visual C# or Beginning Visual C# 2005? FTemplar C# 2005 2 May 2nd, 2006 02:34 PM





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