المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : error: expected ':', ',', ';', '}' or '__attribute__' before '=' token



C++ Programming
01-01-2010, 10:52 AM
After compiling the code given below the following error shows....

main.c:4: error: expected ':', ',', ';', '}' or '__attribute__' before '=' token


#include

struct struct_keywords {

char c_keywords[6][10] = {"int", "char", "static" , /* ERROR SHOWS HERE */
"struct", "union", "return"};

};

typedef struct struct_keywords kewords_t;



int main(int argc ,char *argv) {

kewords_t *struct_ptr;


return 0;
}


What may be the error ?????


With regards