Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++ 2005
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 23rd, 2007, 09:00 AM
Registered User
 
Join Date: May 2007
Location: , , .
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

  #2 (permalink)  
Old June 3rd, 2007, 04:27 PM
Authorized User
 
Join Date: Dec 2006
Location: , , .
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

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 03:10 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.