🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: de.comp.lang.c++
1 messages
1 total messages Started by Nik Wiesel Fri, 22 Dec 1995 03:24
Compilier Fehler bei BC++. Hilfe!!!
#1083
Author: Nik Wiesel
Date: Fri, 22 Dec 1995 03:24
53 lines
1777 bytes
Hallo,
ich habe folgendes Problem: Ich habe 2 Variablen erzeugt. 1 in einer Klasse 
und 2 ausserhalb der Klasse. Nun soll mittels des inlineassembler die addresse 
der Variablen in die Register geladen werden. Hier erzeugt der Compiler fuer 
mich unverstaendliche Fehler.

Hier nun das Beispiel und die Fehlermeldung:

//**************
// C++ Beispiel:
//**************

// globale Variable definieren
int	test;

//*******************
// Klasse deklarieren
//*******************
class A {
	// Klassenvariable definieren
	int	test1;
public:
	A(void);
};

// Konstruktor definieren
A::A(void) {
	asm {
		mov	bx,SEG test
		mov	bx,OFFSET test
		mov	bx,SEG test1
		mov	bx,OFFSET test1
	};
};

// Hauptprogramm
void main(void) {
	A t;
};

------------------------------Fehlermeldung-----------------------

Compiling NONAME00.CPP:
Error NONAME00.CPP 21: Undefined symbol 'test' in function A::A()
Error NONAME00.CPP 23: Expression syntax in function A::A()
Error NONAME00.CPP 24: Expression syntax in function A::A()

------------------------------
Nik Wiesel: UZS198@UNI-BONN.DE
=========================================================================
The above statement is my own opinion and does not represent the point of
view of any organization I am related to.
=========================================================================
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads