delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/23/16:46:33

From: Mike Coulson <mike AT mcoolie DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Very simple: What am I doing wrong?
Date: Fri, 23 Jan 1998 20:42:12 +0000
Distribution: world
Message-ID: <Bpif7BAkCQy0Ew7I@mcoolie.demon.co.uk>
NNTP-Posting-Host: mcoolie.demon.co.uk
MIME-Version: 1.0
Lines: 18
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

The following code produces errors on my compiler (DJGPP).
Is this code OK? I have no idea, and am only a beginner.
I have heard that C++ allows functions to be put into structures. I have
tried to do this, and get errors.

struct a (
        int vara;
        void addone() {
                vara++;
                }
        );

Thanks ever so much for any help. Please reply by email to
Mike AT mcoolie DOT demon DOT co DOT uk
Any replies much appreciated!
-- 
Mike Coulson
mike AT mcoolie DOT demon DOT co DOT uk

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019