Jump to content

Struct Table in C


MELDAW

Recommended Posts

Hello,

The syntax is not correct.

If you want to use the Var_Struct_Student variable, don't specify again the type.

The compiler understands that you want to redefine the type Student.

I don't know what you intend to do with the variable Var_Struct_Student, but this is an exampple of a correct way to use it:

 

int i = 0;

Var_Struct_Student[i].rollNumber = 5;

 

(note: there is another issue here, that you use i before you assign a value to it.)

I would suggest you to get a more solid C background, before using C functions, as debugging them could be more painful than ladder.

C functions are of the type "you know what you are doing? So go for it!"

Hope that helped

Rivka

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...