We've got a code sample today, of a simple integer stack implemented using Whidbey
C++. I'll implement it using three pieces of code:
I compile the stack class into a DLL (stack.dll), which I then import into the main
program with #using. The beauty of stack.dll is that it should be consumable
by any .NET-targeted language: C#, VB.NET, even ASP.NET. In fact, to prove this,
I've also included drv.cs, a C# source file which consumes stack.dll.
Another benefit of using DLLs: during development, I found a bug in my stack program.
I edited stack.cpp, recompiled the DLL, and ran main.exe again. I didn't need
to recompile main! :)
Get the files! The code is available as a zip file: stack.zip.