www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/01/17/16:31:47

From: keane AT earthsun DOT umd DOT edu (Christopher Matthews Keane)
Date: Sun, 17 Jan 1993 15:34:52 -0500
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: C-Language Problem

The problem here is simply that instead of using:
buffer = "... ";
you must use strcpy().  Try strcpy( buffer, "Your String Here");

C sees strings as character arrays, and the current form will simply
assign the first value of the string to buffer[0] and nothing else.
Cheers
Christopher Keane
keane AT earthsun DOT umd DOT edu

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019