Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <213ED6CF802ED111A0AB00805F0DD471F9ED2A@WN01EX> From: "Craveiro, Marco" To: "'cygwin AT sourceware DOT cygnus DOT com'" Subject: newbie: _findfirst bug or is it me? Date: Tue, 20 Jul 1999 17:10:54 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain hi everyone, i'm a newbie that's been using egcs for windows, version 2.91.57 for 2 months. I have a dell PII 233 and everything has been fine until today. but the following code does not work and i just cannot find anything wrong with it: #include #include void main() { int iHandle; int iResult; struct _finddata_t * find; iResult = _chdir ("c:\\"); iHandle = _findfirst ("*.txt", find); if ((iHandle == -1)) cout << "no files found."; else { cout << find->name << "\n"; while (!(iResult == -1)) { iResult = _findnext (iHandle, find); cout << find->name << "\n"; } _findclose (iHandle); } } it produces an ilegal operation if i run it. (crashes in the _findfirst). do i need to do something different to use ?? can anybody tell me what am i doing wrong? thanks, __soup_dragon__ "Somebody help me, tell me where to go from here Cause even Thugs cry, but do the Lord care?" 2Pac -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com