Dear Lists, I am working on a projects which was written in C (*.c), is there any way to use STL Vector or Boost Smart pointer class in this original C codes. WHen I compiled these C codes with VC6.0++, and included with <vector>, the compile give fatal eroor C1189: #error :"eh.h is only for C++!", Any work around without modifying the codes are weclomes, thanks. Jeff __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/
On 一, 6 14, 2004 at 17:25:57 -0700, Jeff Wang wrote:
Dear Lists,
I am working on a projects which was written in C (*.c), is there any way to use STL Vector or Boost Smart pointer class in this original C codes.
WHen I compiled these C codes with VC6.0++, and included with <vector>, the compile give fatal eroor C1189: #error :"eh.h is only for C++!",
Any work around without modifying the codes are weclomes, thanks.
I dont think you can : C does not provide template and "template" is the base component of S"T"L :p -- Allocate four digits for the year part of a date : a new millennium is coming. --- David Huber
On ?@, 6 14, 2004 at 17:25:57 -0700, Jeff Wang wrote:
I am working on a projects which was written in C (*.c), is there any way to use STL Vector or Boost Smart pointer class in this original C codes.
It's possible if your are willing to rename the files to *.cpp (or whatever you preferred C++ extension is). And wrap the same code with: extern "C" { <<original file content>> } -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq
participants (3)
-
Jeff Wang
-
Rene Rivera
-
Ying-Chieh Liao