TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: RAJESH DHAWAN
from: JAVIER KOHEN
date: 1997-07-26 21:03:00
subject: Please help me

On 21-Jul-97, Rajesh Dhawan wrote to Dave Boyd about Please help me.
 RD> Break your source code into graph.c & graph.h.
 RD> Put all your function prototypes (declarations) in graph.h
 RD> along with all global variables that you want to use in later 
 RD> programs.
You shouldn't define anything in the header files, just declarations are
allowed. Ie:
-- baz.h --
int foo(void);
extern unsigned long int bar;
-----
-- baz.c --
static int dummy;
unsigned long int bar;
int foo(void)
{
    if (bar == 1) {
        return dummy;
    } else {
        return -dummy;
    }
}
-----
dummy can't be writen by external modules, but it can be read through
foo(). bar can be read and writen by everybody.
Javier Kohen  [The_Crusher] http://jkohen.base.org
... Pick two: [1] Fast [2] Right [3] Cheap
-!- CrusherTag 0.3.2.
--- Terminate 4.00/Pro
---------------
* Origin: The King of The Ring (4:900/748.3)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.