Program errors cannot be solved after being found online for a long time
Source: Internet
Author: User
For program errors, I cannot find a solution for a long time on the Internet-Linux general technology-Linux technology and application information. The following is a detailed description. 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)
{
Intmqid;
Size_tlen;
Longint 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.