Advertisement

quick question

Started by July 13, 2001 04:49 PM
1 comment, last by Julio 23 years, 7 months ago
ok, can somebody help me with this little code snippet?
      
void GetFileNames(const char path[])
{
WIN32_FIND_DATA FindData;
HANDLE fHandle=FindFirstFile(path,&FindData);
if ( fHandle != INVALID_HANDLE_VALUE )    
{        
	do        
	{            
		printf("\n%c",FileData.cFileName);
	} while ( FindNextFile( fHandle, &FileData ) );        
	FindClose( fHandle );    
	}
}
      
the problem is in the printf statement. The problem is I don't what data type concatenate. thanks to any who reply, Joe EDIT-damn I can't type HHSDrum@yahoo.com Polarisoft Home Page Edited by - Julio on July 13, 2001 5:50:01 PM Edited by - Julio on July 13, 2001 5:51:30 PM
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
huh? Windows programming isn''t my field and I didn''t completely understand the prob, but it seem printf should have "\n%s" because a filename is hardly just one character...
------------------------------If there be no heaven,may there atleast be a hell.-------------------------------Afterlife-
Advertisement
cool, looks like I overlooked the obvious again.
thanks Afterlife
Joe

HHSDrum@yahoo.com
Polarisoft Home Page
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911

This topic is closed to new replies.

Advertisement