Category : Files from Magazines
Archive   : DDJ9403A.ZIP
Filename : XVCPP.ASC

 
Output of file : XVCPP.ASC contained in archive : DDJ9403A.ZIP
_CROSS-PLATFORM DEVELOPMENT WITH VISUAL C++_
by Chane Cullers

Figure 1


(a)

file.C, line 100: error: syntax error

(b)

int Number = 26;
unsigned char Letter;
...

Letter = unsigned char (Number);

(c)

Letter = (unsigned char)Number;


Figure 2:

(a)

file.C, line 100: error: WinCalApp::ExitInstance() type mismatch:
int WinCalApp::ExitInstance() and BOOL WinCalApp::ExitInstance()

(b)

BOOL WinCalApp::ExitInstance()


(c)

int WinCalApp::ExitInstance()


Figure 3:


(a)
file.C, line 100: error: jump past initializer (did you forget a '{ }'?)

(b)
default:
int Number = GetSomeNumber();
...
Doit(Number)


(c)
default:
{
int Number = GetSomeNumber();
...
Doit(Number)
}



Figure 4:

(a)


file.C, line 100: error: syntax error

(b)

DECLARE_DYNAMIC(ClassName);

(c)

DECLARE_DYNAMIC(ClassName)


Figure 5:

(a)


file.C: 100: Overflowed replacement buffer.


(b)
#define DEBUG_NEW new(__FILE__, __LINE__)
#if DEBUG
#define new DEBUG_NEW
#endif
CObject *obj = new CObject;

(c)

#define DEBUG_NEW new(__FILE__, __LINE__)
#if DEBUG
#define MYnew DEBUG_NEW
#else
#define MYnew new
#endif
CObject *obj = MYnew CObject;



Example 1:

typedef unsigned short WORD;
int function()
{
WORD wOne;
int nTwo;
...
nTwo = (WORD)wOne;
...
}


Example 2:


(a)

struct tagPOINT
{
short x;
short y;
};
class CPoint : tagPOINT {
...
CPoint::CPoint(DWORD);
...
};
CPoint::CPoint(DWORD dwPoint);
{
*(DWORD *)this = dwPoint;
}

(b)

CPoint::CPoint(DWORD dwPoint)
{
x=LOWORD(dwPoint);
y=HIWORD(dwPoint);
}





  3 Responses to “Category : Files from Magazines
Archive   : DDJ9403A.ZIP
Filename : XVCPP.ASC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/