Undefined setw() function

This is a discussion on Undefined setw() function within the C++ Programming forums, part of the General Programming Boards category; recieving a Undefined setw() function have the following libraries declared which one am i missing #include <conio> #include <time> #include ...

  1. #1
    Registered User
    Join Date
    Aug 2004
    Posts
    19

    Undefined setw() function

    recieving a Undefined setw() function have the following libraries declared which one am i missing

    #include <conio>
    #include <time>
    #include <math>
    #include <stdlib>
    #include <stdio>
    #include <string>
    #include <iomanip>
    #include <iostream>

    cheers

  2. #2
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,807
    how are you using the setw(). setw() is defined in <iomanip> so your fine their
    Woop?

  3. #3
    Registered User
    Join Date
    Aug 2004
    Posts
    19
    Using it like

    Code:
    std::cout<<setw(10)<< array[plane][col][row];
    Which seems ok or maybe not.

  4. #4
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,807
    You would think so but setw is still in namespace std.
    Try
    Code:
    std::cout<<std::setw(10)<<array[plane][col][row];
    Woop?

  5. #5
    Registered User
    Join Date
    Aug 2004
    Posts
    19
    cheers works a treat

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. In over my head
    By Shelnutt2 in forum C Programming
    Replies: 1
    Last Post: 07-08-2008, 06:54 PM
  2. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  3. C OpenGL Compiler Error?
    By Matt3000 in forum C Programming
    Replies: 12
    Last Post: 07-07-2006, 04:42 PM
  4. Bisection Method function value at root incorrect
    By mr_glass in forum C Programming
    Replies: 3
    Last Post: 11-10-2005, 08:10 AM
  5. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-29-2005, 11:21 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21