|
Hi,
i writing a code in c language in load runner to upload a file into the current directory using c.I am getting an error
"operands of = have illegal types `pointer to char' and `int'"
Below is my code:-
char *current_dir = getcwd();
char *filename = "current_dir:\\EUR_PR_01302013.txt";
long file_stream;
if ((file_stream = fopen(filename, "a+")) == NULL) //open file in append mode
{
lr_output_message("Unable to create %s", filename);
return -1;
}
Any kind of help/suggestion will be appreciated.
regards,
raghvendra panda
|
|
|
|
|
Which line gives the error?
And please use <pre> tags around your code.
|
|
|
|
|
You have to format the filename string.
Also need to allocate memory to it.
char filename[1024];
sprintf(filename, "%s\\EUR_PR_01302013.txt", current_dir);
|
|
|
|