Program error. It cannot be solved after searching online for a long time
Source: Internet
Author: User
A program error occurs. If you have not found a solution for a long time on the Internet-Linux general technology-Linux programming and kernel information, see the following for details. When I compile the following program, the compilation fails.
# Include "unistd. h"
# Include "stdlib. h"
# Include "stdio. h"
# Include
# Include
# Include
Int
Main (int argc, char ** argv)
{
Int mqid;
Size_t len;
Long int type;
Struct msgbuf * ptr;
If (argc! = 5)
Fprintf (stderr, "usage: msgsnd <# Bytes> Data ");
Len = atoi (argv [2]);
Type = atoi (argv [3]);
[Root @ localhost ch6msg] # gcc msgsnd. c-o msgsnd
Msgsnd. c: In the 'main' function:
Msgsnd. c: 26: Error: Leading pointer to incomplete type
Msgsnd. c: 27: Error: Leading pointer to incomplete type
Which of the following experts can help solve the problem?
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service