Newsgroups: comp.sys.mac.programmer Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!src.honeywell.com!msi.umn.edu!umeecs!lagana From: lagana@zip.eecs.umich.edu (Antonio A Lagana) Subject: Getting Strings To Work, Need HELP! Message-ID: <1991Jun16.224559.12609@zip.eecs.umich.edu> Organization: University of Michigan EECS Dept. Distribution: usa Date: Sun, 16 Jun 1991 22:45:59 GMT 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 #include ... 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