www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/09/13/04:23:36

Date: Tue, 13 Sep 94 00:48:21 -0700
From: victor AT mechatro1 DOT Berkeley DOT EDU (Victor K. Chu)
To: DJGPP AT sun DOT soe DOT clarkson DOT edu
Subject: problem with stream manipulator

Dear DJGPP Users,

I have got a problem with stream manipulators.  When I compiled the 
following program (I called it "manip.cc")

    #include <iomanip.h>
    int main() 
    {
	cout << setw(5) << 234;
    }

I got an error message:

    manip.cc:4: main: undefined reference to `operator<<(ostream &, 
    smanip<int> const &)'

The command that I used to compile the program was:

    gcc -g -Wall manip.cc -lgpp -lm

Any comment?

Victor Chu

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019