Hi, it is not giving me any errors. Can you post some more code (before that line) ?
---
Harish
Main Topics
Browse All TopicsI get a compilation error with the following code>
C code:
char jobname[10];
memcpy(jobname, " ", 10); /* this is line 131 */
Compilation errors:
GC99999/C(STATUS), 131.51: CZM0046(30) Syntax error.
GC99999/C(STATUS), 131.19: CZM0182(30) Arguments missing for built-in function __memcpy.
GC99999/C(STATUS), 131.19: CZM0277(30) Syntax error: possible missing ';' or ','?
I have used the same code in another program with no problem.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi Harish,
Assuming there are no syntax errors prior to these lines I was guessing perhaps memcpy is undefined (lacking the header) but the undefined'edness would also be reported.
I'd guess 'memcpy' has been #defined incorrectly somewhere seems to me to be the next most likely option but it is distinctly rarer.
Lets see what JC has to say :-)
Paul
Since I got the following error message the memcpy function is defined; it just says I have missing arguments.
GC99999/C(STATUS), 131.19: CZM0182(30) Arguments missing for built-in function __memcpy.
Also the next statement is:
memcpy(prtfil, (((var_record_t *)\
lstptr2)->Data_Field),
(((Qus_LSPL_Key_Info_t *)lstptr2)\
->Data_Length));
and it doesn't get a compilation error.
Try this simple program :
----------
#include <stdlib.h>
int main(void) {
char test[10];
memcpy((void*) &test[0], (const void*) "test", (size_t) 5);
memcpy(&test[0], "test", 5);
memcpy(test, "test", 5);
return 0;
}
----------
And see if, and at what line the compiler gives an error.
If it doesn't give an error at all, then check whether you correctly included the header file containing the declaration of memcpy(void*, const void*, size_t), AND that there's no re-declaration of memcpy anywhere !!!
If there is a compiler error at one of the above lines, then change your code to match the last correct line's syntax.
If the first line in the above code also provokes a compiler error, then you might want to check if the standard library hasn't been corrupted somehow. What compiler are you using ?
Business Accounts
Answer for Membership
by: PaulCaswellPosted on 2006-05-14 at 11:38:35ID: 16678339
Hi jc31415,
Have you got:
#include <memory>
?
Paul