RMDIR bugging???

Hello,
I need help with RMDIR desperately...

well, I got this code from the HELP files but doesn't seem to be working...

/* remove example: remove or delete directory C:\test */
#include <stdafx.h>
int _rmidr(
      const char "C:\\test"
);
   return 0;
}


but what's wrong with this




Answer this question

RMDIR bugging???

  • Rory VLI

    Thank you but, as I tried it,
    it said this:

    my documents\visual studio 2005\projects\dedloc\dedloc\dedloc.cpp(5) : error C3861: '_rmdir': identifier not found

    to:
    _____________________________________________
    #include <stdafx.h>
    int main()
    {
          _rmdir("C:\\test")
    }
    ______________________________________________



    how am I suppose to fix this

    and what is a identifier



  • HDo

    Eh ... almost everything

    I presume you are trying to do the following:

    #include <direct.h>

    int main()
    {
       _rmdir("C:\\test");
    }



  • Roy_Welch

    sorry...
    I am just a newbie new to C++
    Thank you very much for your kind answer


  • JordSTAR

    An identifier is a name: it identifies something. In your code "_rmdir" is an example of an identifier and in this context it identifies a function which, if invoked, will deleted a directory on your disk.

    If you look at my example above you will see that it starts with:

    #include <direct.h>

    I would like to suggest that you replace

    #include <stdafx.h>

    with

    #include <direct.h>

    But unfortunately that will probably cause more problems than it fixes. So instead why don't you add it immediately after the #include. For example:

    #include <stdafx.h>
    #include <direct.h>


    My I also suggest that you go out a purchase, and read, a good introductory book on C++. I personally like Accelerated C++ or The C++ Primer.



  • RMDIR bugging???