[Circle] [System] MSVC++ Standard

From: collins (collins@raptor.eznets.canton.oh.us)
Date: 08/27/96


Just a small Q, but....

   MSVC++ Standard version would work fine for CircleMUD like Enterprise
Edition, etc, right? I want to know before I spend $100 on somthing that might
not be fully compatible, or I'd like to know so I don't spend $500 or $1000 
on something where I could've bought something cheaper.

   :)                               J Wins
                                    Fatality
                                     ` ,' . ` '. '  .` `
           /\         /\    /\     \__/\__/\_O /\    /\
            /\             /\    /\    /\    _/      /\          /\
                 /\                      /\  Pretty Gross, eh. I'm in a
gross mood t'day :)
                                             Tomorrow it'll be
flowers......heh   heh.....

-J



+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+


From cat@vuse.vanderbilt.edu Mon, 26 Aug 96 18:44:09 -0500
X-SystemInfo: MyE-Mail: EMail
X-Message-No: 4065 (database)
From: Katzlberger Thomas <cat@vuse.vanderbilt.edu>
To: circle <circle@cspo.queensu.ca>
Subject: Re: [Circle][CODE] Linking C++ to the C Mud 
Date: Tue, 27 Aug 96 00:44:00
Message-ID: <9608262344.AA00416@localhost.vuse.vanderbilt.edu>
Reply-To: katzlbt@vuse.vanderbilt.edu (katzlbt)
X-POP3-Rcpt: lk4150@per
Return-Path: <@QUCDN.QueensU.CA:owner-circle@cspo.queensu.ca>
Received: from QUCDN.QueensU.CA (QUCDN.QueensU.CA [130.15.126.2]) by per.cybercity.dk (8.6.12/8.6.12) with SMTP id AAA00820 for <lk4150@krull.dk>; Tue, 27 Aug 1996 00:49:32 +0200
Received: from cspo.queensu.ca by QUCDN.QueensU.CA (IBM VM SMTP V2R2) with TCP;Mon, 26 Aug 96 20:02:21 EDT
Received: by cspo.queensu.ca (SMI-8.6/SMI-SVR4)id TAA12743; Mon, 26 Aug 1996 19:45:13 -0500
Received: from vuse.vanderbilt.edu by cspo.queensu.ca (SMI-8.6/SMI-SVR4)
Received: from localhost.vuse.vanderbilt.edu by vuse.vanderbilt.edu (8.7.5/SMI-4.1/VUSE-1.24)
Received: by localhost.vuse.vanderbilt.edu (NX5.67f2/NX3.0S)
Mime-Version: 1.0 (NeXT Mail 3.3 v118.2)
X-Nextstep-Mailer: Mail 3.3 (Enhance 1.3)
Received: by NeXT.Mailer (1.118.2.RR)
References: <Pine.OSF.3.91.960826122758.6018A-100000@peta.engr.mun.ca>
X-My-Email: katzlbt@vuse.vanderbilt.edu
Sender: owner-circle@cspo.queensu.ca
Precedence: bulk

Someone wrote:
> Hi
> 
> > eventQueue->addEvent(new Event(ch,"say damn",8));
> > // char says damn in 1 tick *grin*
> > 
> 
> Is "new" a C keyword? Or is this designed for C++?

new is the counterpart of malloc in C++ not needing
a sizeof argument in C:

The line

eventQueue->addEvent(new Event(ch,"say damn",8));

translates in C to:

e = malloc(sizeof(struct Event));
e->ch = ch;
e->when = 8;
e->doWhat = "say damn";
add_event(eventQueue,e)

The whole code is C++ but you can compile it and 
link it even to a normal C style MUD with a little bit
of code twisting. The only proble is that:

int fun(int,short,char)

Links in C++ as: _fun_iisc
and in C as:     _fun

However I think it should be possible to avoid
the hngfagrrr() function, but I didn't find it out.

Dedicated for those of you who want to explore C++.

// Katzlberger Thomas March 1995

extern "C"
{
	#include <stdio.h>
	#include <string.h>
	#include <ctype.h>
	#include <stdlib.h>

	extern int number(int,int);
	
	// include what you want here - 
	// Just make sure it contains no C++ keywords
}

class Something
{
		int  capacity;
	
	public:
		Something() ...
		
		static int doSomething(int x);

};

Something::Something()
{
}

/*********** C INTERFACE ************/

static char* hngf_agggrrrrrr(const char* ...)
{
	return Something::doSomething(int x);
}

extern "C" {

// call this from the MUD
char* do_cplusplus(int i)
{
	return hngf_agggrrrrrr(mobName,mobArea,question);
}

}

Cat.
---
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/_/                                                            _/_/
_/_/  Thomas Katzlberger                                        _/_/
_/_/  katzlbt@vuse.vanderbilt.edu                               _/_/
_/_/  @aWhiteNeXT.called.garfield                               _/_/
_/_/  http://www.vuse.vanderbilt.edu/~katzlbt/                  _/_/
_/_/                                                            _/_/
_/_/  "You can tune a file system, but you can't tune a fish."  _/_/
_/_/                                UNIX man page for tunefs.   _/_/
_/_/                                                            _/_/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/07/00 PST