|
-
August 19th, 2004, 08:24 AM
#1
strcat problem
First of all, somewhat newbie to C++. I know the basics, just not all the "fine detail". My question...
I get an error - "The instruction at "mem location" referenced memory at "mem location". The memory could not be "read".
I have searched the archives, and couldn't find an answer to why I am getting this. Here is a snippet of my code. The problem seems to be with the strcat function. I have debugged it to here.
int buno = 0;
char filepath[64] = "C:\\some path here\\";
char filesuffix[32] ="_flt_test.csv";
char bunotostring[5] = "123456";
// Convert buno number (int) to string
sprintf(bunotostring, "%d", buno);
char *fp = strcat(filepath,strcat(filesuffix,bunotostring));
for some reason, when I try to use strcat, I get this error. Any thoughts, and sorry for the newbie post....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|