declaration error

G

Guest

Could anyone correct the error in my logic here?:

#include <stdio.h>
#include <stdlib.h>
main ()
{
const char message1[] = {"\nCurved portion of graph -- D.G.A.C.\
\n A B C"};
const char message2[] = {"\nCurved portion of graph -- R.A.C.\
\n A D E"};
const char message3[] = {"\nCurved portion of graph -- D.G.A.C.\
\nA\tB\tC"};
const char message4[] = {"\nCurved portion of graph R.A.C.\
\nA\tD\tE"};
char ( * const msgptr12 [] ) [] = { message1, message2 };
char ( * const msgptr34 [] ) [] = { message3, message 4};
/* lint gives a type mismatch error for the previous two lines. */
char stringbuf [85];

...

printf ( "%s", msgptr12 );
numbchar = sprintf (stringbuf, "%s", msgptr34 );
fwrite (stringbuf, numbchar, 1, ofptr);


Any thoughts or suggestions will be appreciated. L e e _ S h a c k e
l f o r d @ d o t . c a . g o v
 
M

Mark A. Odell

Could anyone correct the error in my logic here?:

#include <stdio.h>
#include <stdlib.h>
main ()
{
const char message1[] = {"\nCurved portion of graph -- D.G.A.C.\
\n A B C"};

Isn't this the *third* time you've posted this exact question? What's
wrong with the answers you've already gotten?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,108
Latest member
AlbertEste
Top