www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/23/15:37:55

From: Neil Roy <royn AT usa DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Converting MIcrosoft/Borland C to GNU C
Date: Sun, 23 Feb 1997 14:30:50 -0500
Organization: IGS - Information Gateway Services
Lines: 29
Message-ID: <33109AEA.6AD3@usa.net>
Reply-To: royn AT usa DOT net
NNTP-Posting-Host: ttya0b.king.igs.net
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I am a beginner C programmer, I used to program in BASIC (QuickBasic
and others) and have read "Moving from QBasic to C" (great book!) and
will be reading a C++ book and then will be moving on to a rather
lengthy book on game programming, the problem is, while the C and C++
books properly teach you using ANSI C examples, the game programming
book uses Microsoft C (7.0) examples and I was wondering if anyone out
there had any tips/sugestions etc... on how I should go about converting
the source code over.  I know about "far", "near" etc... (or think I do,
if you have any insights into that part of programming please let me
know!) but after removing the "far" from the source, more often than
not, the program simply will not execute properly (if at all).  I
usually get tons of compiler errors.
	Another problem I noticed with GNU/DJGPP is that after I compile and
example program, say:

	printf("Enter your age:");
	scanf(" %d", &age);

	...the prompt "Enter your age:" doesn't appear until the age is
entered.  I realize that scanf() is probably the worst way to get input,
but just for examples and testing it should still print the printf()
before the scanf().  Have I missed something here or is there a bug I
have stumbled upon?
	Any help is appreaciated and remember, you were a "newby" at one time
or another too! ;-)

	Thanx in advance;
	Neil Roy		
	Email: royn AT usa DOT net

- Raw text -


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