Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - String Streams in Hybrid C/C++ Win16 App
Is it possible to build a Win16 app in C with single object module in C++ that performs stream i/o on string buffers (strstream). The app is a WINIO app which does have some effects on printf and other calls. But it should be possible to set up a strstream object in separate .cpp files. Mark May 11 2001
Sure! It's basically a matter of compiling things the right way and making sure the compiler understand what is C and what is C++ code. Many times with ancient projects I have just renamed .C files to .CPP and compiled them as C++ programs while the .CPP files basically only contain C coded source. You might have to put some stuff between #ifdef __cplusplus extern "C" { #endif // C-stuff #ifdef __cplusplus } #endif To make sure certain prototypes etc, don't get mangled. Don't worry, be Kneppie! Jan Mark Evans wrote:Is it possible to build a Win16 app in C with single object module in C++ that performs stream i/o on string buffers (strstream). The app is a WINIO app which does have some effects on printf and other calls. But it should be possible to set up a strstream object in separate .cpp files. Mark May 11 2001
I don't see any reason why it shouldn't be possible. Mark Evans wrote in message <1103_989602360 evans>...Is it possible to build a Win16 app in C with single object module in C++ May 11 2001
|