lagana@zip.eecs.umich.edu (Antonio A Lagana) (06/17/91)
I have a (very dumb, but it's driving me nuts!!!) small question for the Mac
(or for that matter, C) programmers on the net. I have started attempting to
program on the Mac using Think C and I am having no success in getting a simple
file renaming to work. Could somebody tell me what is wrong with the following
and the correct way to do it?
#include <MacTypes.h>
#include <FileMgr.h>
...
main()
{
...
Str255 oldname="\pHD105:Old File Name";
Str255 newname="\pHD105:New File Name";
...
...
Rename(oldname,vRefNum,newname);
...
}
No matter what combination I use (StrPtr, char, char *, char [], etc.) I cannot
get the rename to work. I am a relative beginner at programming in C, at least
as far as strings are concerned, so please bear that in mind when replying :).
Please e-mail to the below address as I think that this is not of general
interest.
Thanks in advance,
Antonio A. Lagana
lagana@zip.eecs.umich.edu