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)
|