LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-05-2009, 09:31 AM   #1
Oaks
LQ Newbie
 
Registered: Aug 2009
Posts: 4

Rep: Reputation: 0
typedef in C


Whether it is possible to write in C (C89, C99) ?

typedef struct {LIST*,LIST*}LIST;

What this construction can be replaced ?
 
Old 08-05-2009, 09:49 AM   #2
dmail
Member
 
Registered: Oct 2005
Posts: 970

Rep: Reputation: Disabled
No it is not possible to use that code, instead the _norm_ is to write something like:
Code:
typedef struct List_node
{
	struct List_node* head;
	struct List_node* tail;
}List;
or
Code:
typedef struct List_node List;

struct List_node
{
	List* head;
	List* tail;
};
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[C] The FAR in typedef koyi Programming 2 07-21-2006 07:37 PM
having problem with typedef TurtleFace Programming 4 03-30-2006 09:18 PM
a question regarding typedef erikash Programming 1 11-10-2005 04:37 AM
Can you help me with typedef? brownstone Programming 3 06-11-2004 10:09 AM
sizeof my typedef... jhorvath Programming 7 10-11-2002 05:41 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration