TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: WADE CARPENTER
from: JAVIER KOHEN
date: 1997-07-28 16:38:00
subject: How would I...

On 22-Jul-97, Wade Carpenter wrote to All about How would I....
 WC> I'm using Tc++ v.3 in dos, and I'm trying to read 
 WC> a directory name, like "C:\WINDOWS\SYSTEM" for example,
 WC> using gets(dirw).
You shoul post the code in conflict...
 WC> When I enter a directory, it messes it all up and all my 
 WC> char strings get mixed together, like for example my
 WC> dir2 string will get the end characters of "C:\WINDOWS\SYSTEM"
 WC> and other strings just plain disappear.  This baffles me..
Is dirw big enough to contain the input string? You shouldn't be using
gets(), try fgets() instead... gets() my lead to string overflow
problems (that seems to be your case).
Javier Kohen  [The_Crusher] http://jkohen.base.org
... If at first you don't succeed, create an "NT" version.
-!- 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™.