Hi, What is the error you're getting (any compiler warnings)? How is insert() declared? Insert() is from some external library, I would assume? 1) your 'string' declared&defined as you pointed out here may be too short for a placeholder for which you're using it. 2) the problem may be that compiler put the content of the 'string' somewhere where it is not visible inside insert(); Try putting it yourself on the heap, with something like: > char* string = NULL; > string = new char[maxstringsize]; // make sure you're handling throw from new, or check for NULL > .. > strcpy(string, "something"); // make sure that "something" is not too long > insert("FileName", "RowNum", "ColNum", string); > ... HTH. Anyway, send more details... Cheers. -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Gerhard Fiedler Sent: Friday, January 27, 2006 4:52 AM To: piclist@mit.edu Subject: Re: [OT] Strings in VC John Pearson wrote: > Why can't I replace the text in this command with a string? > > [insert("FileName", "RowNum","ColNum", "Number")] > > I want to do this: > > char string[] = "123"; > [insert("FileName", "RowNum","ColNum", string)] > > It won't work. Why? It would help a lot if you explained a bit what "insert" you are talking about. It also doesn't look like C(++), with those brackets and without a semicolon at the end... What is this? Gerhard -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist