Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > declaration error

Thread Tools

declaration error

Jacob Schmidt
Posts: n/a
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.\
const char message4[] = {"\nCurved portion of graph R.A.C.\
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 [i] );
numbchar = sprintf (stringbuf, "%s", msgptr34 [i] );
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
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can a static function declaration conflict with a non-static declaration? C Programming 4 12-12-2006 10:26 PM
maxplusII error: a deferred constant declaration without a full declaration is not supported Noah VHDL 5 04-07-2006 02:34 PM
"virtual outside class declaration" and "declaration does not declare anything" kelvSYC C++ 6 05-17-2005 08:58 AM
Function declaration in class declaration Ovidesvideo C++ 4 12-10-2004 06:36 PM
Intel C++ 8.0 : declaration hides declaration Alex Vinokur C++ 4 04-05-2004 09:49 PM