how to open a file on a perticular path

how to open a file on a perticular path i.e.
if I want to open a file stored on d:deepakdd then how to use fopen()
whether it should be like that
fp=fopen("d:deepakddd1.dat","r+")

plz help

Comments

  • : how to open a file on a perticular path i.e.
    : if I want to open a file stored on d:deepakdd then how to use fopen()
    : whether it should be like that
    : fp=fopen("d:deepakddd1.dat","r+")
    :
    : plz help
    :
    :

    fp=fopen("d:[red][/red]deepak[red][/red]dd[red][/red]d1.dat","r+")
  • : : how to open a file on a perticular path i.e.
    : : if I want to open a file stored on d:deepakdd then how to use fopen()
    : : whether it should be like that
    : : fp=fopen("d:deepakddd1.dat","r+")
    : :
    : : plz help
    : :
    : :
    :
    : fp=fopen("d:[red][/red]deepak[red][/red]dd[red][/red]d1.dat","r+")
    :
    If you want to acces a file using the old C way then do it this way :
    FILE *fp;
    fp=fopen ("D:deepakddd1.dat","r+");
    that is it.


  • : : : how to open a file on a perticular path i.e.
    : : : if I want to open a file stored on d:deepakdd then how to use fopen()
    : : : whether it should be like that
    : : : fp=fopen("d:deepakddd1.dat","r+")
    : : :
    : : : plz help
    : : :
    : : :
    : :
    : : fp=fopen("d:[red][/red]deepak[red][/red]dd[red][/red]d1.dat","r+")
    : :
    : If you want to acces a file using the old C way then do it this way :
    : FILE *fp;
    : fp=fopen ("D:deepakddd1.dat","r+");
    : that is it.
    :
    No, as Lundin wrote it, each '' must be replaced by '\' in the path.
    Steph
  • : : : how to open a file on a perticular path i.e.
    : : : if I want to open a file stored on d:deepakdd then how to use fopen()
    : : : whether it should be like that
    : : : fp=fopen("d:deepakddd1.dat","r+")
    : : :
    : : : plz help
    : : :
    : : :
    : :
    : : fp=fopen("d:[red][/red]deepak[red][/red]dd[red][/red]d1.dat","r+")
    : :
    : If you want to acces a file using the old C way then do it this way :
    : FILE *fp;
    : fp=fopen ("D:deepakddd1.dat","r+");
    : that is it.
    :


    I don't know what "the C old way" is. Follow ANSI C and use the syntax I suggested.

  • i just want to say i was mistaken.I agree you did it the right way.
    I am sorry for the misunderstanding.

    : : : : how to open a file on a perticular path i.e.
    : : : : if I want to open a file stored on d:deepakdd then how to use fopen()
    : : : : whether it should be like that
    : : : : fp=fopen("d:deepakddd1.dat","r+")
    : : : :
    : : : : plz help
    : : : :
    : : : :
    : : :
    : : : fp=fopen("d:[red][/red]deepak[red][/red]dd[red][/red]d1.dat","r+")
    : : :
    : : If you want to acces a file using the old C way then do it this way :
    : : FILE *fp;
    : : fp=fopen ("D:deepakddd1.dat","r+");
    : : that is it.
    : :
    :
    :
    : I don't know what "the C old way" is. Follow ANSI C and use the syntax I suggested.
    :
    :

  • [b][red]This message was edited by bluj91 at 2006-11-15 15:40:57[/red][/b][hr]
    : i just want to say i was mistaken.I agree you did it the right way.
    : I am sorry for the misunderstanding.
    :
    : : : : : how to open a file on a perticular path i.e.
    : : : : : if I want to open a file stored on d:deepakdd then how to use fopen()
    : : : : : whether it should be like that
    : : : : : fp=fopen("d:deepakddd1.dat","r+")
    : : : : :
    : : : : : plz help
    : : : : :
    : : : : :
    : : : :
    : : : : fp=fopen("d:[red][/red]deepak[red][/red]dd[red][/red]d1.dat","r+")
    : : : :
    : : : If you want to acces a file using the old C way then do it this way :
    : : : FILE *fp;
    : : : fp=fopen ("D:deepakddd1.dat","r+");
    : : : that is it.
    : : :
    : :
    : :
    : : I don't know what "the C old way" is. Follow ANSI C and use the syntax I suggested.
    : :
    : :
    :
    :

    You see under c is an escape code and hence be foloowed somethingy. Example printing a will give you a head ache. Print
    will print a line break printing
    will return the carriage. Lot's of them there are. but in you case in order to put a backslash, , in C or C++ you must use the escape code \ for the backslash.

    And I think this has been implemented long before the dawn of time, ie. this is common 'the Old C'.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories