[vtkusers] Print method problem

Jia-Ming Pong simukoap at gmail.com
Tue Aug 22 11:45:31 EDT 2006


Hi all,

  I am using vtk5.0 on vc++6.0. I tried to use Print method, but a problem
appear when I compile.
---------------------------------------------------------------------------------------------------------------------------------------------------
D:\sur\surfacer.cpp(143) : error C2664: 'Print' : cannot convert parameter 1
from 'class std::basic_ostream<char,struct std::char_traits<char> >' to
'class ostream &'
        A reference that is not to 'const' cannot be bound to a non-lvalue
Error executing cl.exe.
---------------------------------------------------------------------------------------------------------------------------------------------------

This is my code of that line:
-------------------------------------------------------------------------------
  normals->GetOutput()->Print(std::cout);
------------------------------------------------------------------------------

I already include:
#include <iostream.h>
using namespace std;

Why this happen? Could someone tell me? Any help is greatly appreciated.
Thank you very much.

Best,
Jia-Ming
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060822/7dfc90c9/attachment.htm>


More information about the vtkusers mailing list