Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.7.0.5 $; site smu Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!ihnp4!inuxc!pur-ee!uiucdcs!convex!smu!mike From: mike@smu Newsgroups: net.micro.mac Subject: Re: Mac help! Message-ID: <20800020@smu> Date: Sat, 13-Jul-85 13:16:00 EDT Article-I.D.: smu.20800020 Posted: Sat Jul 13 13:16:00 1985 Date-Received: Wed, 17-Jul-85 05:45:01 EDT References: <2133@sdcc6.UUCP> Lines: 27 Nf-ID: #R:sdcc6.UUCP:-213300:smu:20800020:000:753 Nf-From: smu!mike Jul 13 12:16:00 1985 Sorry guy, but you can't copy a string in C by a simple assignment statement! char buffer[255]; buffer = "Some string"; The above two lines are attempting to assign the *address* of the string constant to the array, and this is a meaningless operation. What you really want to do is char buffer[255]; strcpy(buffer, "Some string"); The strcpy() library routine will copy the source string (second arg) to the destination address given (first arg). Remember, when used in an expression, a string constant (or an unsubscripted array name) represents the address of the string, something of type char *. The Megamax interface routines do all the converting to Pascal style strings automatically. Mike McNally SMU mike@smu ...convex!smu!mike