From: "A. Sinan Unur" Newsgroups: comp.os.msdos.djgpp Subject: Re: - HELP! - a little mixed up in C/C++ pointers Date: Mon, 18 Aug 1997 09:51:24 -0400 Organization: Cornell University Lines: 47 Sender: asu1 AT cornell DOT edu (Verified) Message-ID: <33F8535C.4932@cornell.edu> References: <33F7F642 DOT 30B9 AT usa DOT net> NNTP-Posting-Host: 128 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Gal wrote: > > Okay here I start: > > // defining types variables > struct IndexFileName { > char FileName[12]; > } > > int IndexFileName; > > // our function > int compare (char *FileName) > { > return strcmp(Index.FileName, FileName); > } > > //main > void main () FYI: int main(void) > { > printf("%d\n", compare("TEST.TST")); you did not include for printf. > return 0; > } comp.os.msdos.djgpp is not a forum to discuss basic C/C++ issues. you are better of posting to more relevant groups such as: comp.lang.c, comp.lang.c++ and their moderated counterparts. that said, do you not read what the compiler tells you: C:\djgpp\c>gcc sss.c -o sss.exe sss.c:5: two or more data types in declaration of `IndexFileName' sss.c: In function `compare': sss.c:10: `Index' undeclared (first use this function) sss.c:10: (Each undeclared identifier is reported only once sss.c:10: for each function it appears in.) -- Sinan