Hello everyone,
I'm into writting a project ,that's all about dealing with directories and more specificly to code something that finally well work as"windows command prompt" in standard console....
i Got alot help from the experts here & got alot progressed, But a bug has occured in between:
yestreday i got announced that we've got to use the WIN32_FIND_DATA stuct and use it's members to deal with directories only. To be given more help the teacher wrote down this code for us :
bool isdirecory(wchar_t *temp)
{
WIN32_FIND_DATA filedata;
HANDLE h.search;
h.search=FindFirstFile(temp, & filedata);
if (filedata.dwattributes==16)
return true;
else
return false;
}
this function supossedly is to identify whether the variable "temp" is a directory in the system or not !
But the fact is that i cant realize what process is going on. all my searches about this stuct looks quite wierd i cant make head or tails of. ccan any one pppplllleeeaassse clarify for me what do the items above, each one of them, do ? .....as well as letting me know how i can pass an argument to this function ?, is the argument "wchar_t" the address we're gonna check its validity ...or what is it at all ? arent all addresses in char* mode ?... how to modify them if yes ??? ....i feel totally mixed up with these few lines ! any helps will highly be appriciated !
Thanx in advance
Mahsa M
19
student of computer engeneering **in the very begining of course**