J
Jacob Schmidt
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
#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