[vtkusers] vtkSTLReader Convert hexadecimal to decimal
Bayliss, Chris (Chicago)
cbayliss at gnresound.com
Wed Feb 1 14:02:08 EST 2012
Hello users,
I am trying to input an .stl file and print the point count as a base 10
number. The code below works for printing the point count in
hexadecimal, but I am having trouble converting that number to a
standard base 10 decimal.
The errors I am getting are:
Error C2440: Cannot convert from 'vtkSTLReader*' to 'const char'
Error C2663: 'strtoul cannot convert parameter 1 from 'const char' to
'const char'.
vtkSTLReader *Reader = vtkSTLReader::New();
Reader->SetFileName(argv[1]);
Reader->Update();
Reader->GetOutput()->GetNumberOfPoints();
std::cout << Reader << std::endl;
std::cout << "Reader is of type" <<typeid(Reader).name() <<
std::endl;
const char pntcount = Reader;
pntcount->Update();
std::cout<<strtoul( pntcount ,NULL,16);
std::cin.get();
Reader->Delete();
Thanks in advance for the help.
Chris
**** GN GROUP NOTICE - AUTOMATICALLY INSERTED ****
The information in this e-mail (including attachments, if any) is considered confidential and is intended only for the recipient(s) listed above. Any review, use, disclosure, distribution or copying of this e-mail is prohibited except by or on behalf of the intended recipient. If you have received this email in error, please notify me immediately by reply e-mail, delete this e-mail, and do not disclose its contents to anyone. Any opinions expressed in this e-mail are those of the individual and not necessarily the GN group. Thank you.
******************** DISCLAIMER END ************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120201/4cb1d848/attachment.htm>
More information about the vtkusers
mailing list