Topic: MSVC manipulator bug?
Author: bkline%occs.nlm.nih.gov (Bob Kline)
Date: Mon, 6 Jun 94 13:40:03 GMT Raw View
The code example below gets the message
manip.cpp(6) : warning C4270: 'initializing' :
do not initialize a non-const 'class ::__SMANIP_int __far &'
with a non-lvalue 'class ::__SMANIP_int ' function return
from Microsoft C/C++ 8.00c. Is there anything wrong with the
code, or is this just a bug in the compiler?
#include <iostream.h>
#include <iomanip.h>
void foo()
{
cout << setw(10) << "XX" << endl;
}
[I apologize in advance for posting this question here. I tried
comp.lang.c++ but got no response. I get a best a 50% success rate
in getting any answer at all on that group, and I suspect it's
because the group has grown so large and is so diverse that it
needs to be split.]
/*----------------------------------------------------------------------*/
/* Bob Kline CSI Technologies */
/* bkline@smtp.csof.com Corporate Software, Inc. */
/* voice: (703) 522-0820 fax: (703) 522-5407 */
/*----------------------------------------------------------------------*/