Subj : Re: Software Job Market Myths To : comp.programming,comp.software-eng From : Baxter Date : Thu Aug 18 2005 11:40 pm "CTips" wrote in message news:11gachp1dtirv08@corp.supernews.com... > Baxter wrote: > > > > strSource can be const or non-const - the compiler does not care. "const > > char *strSource" means that strcpy will not make any changes to strSource. > > Ummm...we're talking about freestanding implementations [with a RYO > string implementation] where the prototype for strcpy is: > char * strcpy(char *dst, char *src); > If you use: > foo( const char * x) > { > .... > strcpy(.., x); > } > you'll get warnings. Check back up the thread - that wasn't what he was doing, the basis of the discussion. In his fragment, there was no const's, nor was there any indication of a freestanding implementation of strcpy or strcat: > char* strconcat(char* s1, char* s2) > { > char buf[256]; > > strcpy(buf, s1); > strcat(buf, s2); > > return buf; > } -- --------------------------------------------------------------------- DataGet & PocketLog www.dataget.com Data Collectors www.baxcode.com -------------------------------------------------------------------- .