LinuxQuestions.org
Review your favorite Linux distribution.
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 06-03-2005, 05:26 AM   #1
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,133

Rep: Reputation: 45
explain me this c code plz


typedef u_long oid;
typedef u_char oid;
Can u explain me plz what the typedef means and what's the difference between u_long and u_char?
Thx a lot
 
Old 06-03-2005, 05:32 AM   #2
trevelluk
Member
 
Registered: Nov 2003
Location: Bristol, UK
Distribution: Debian Lenny, Gentoo (at work)
Posts: 388

Rep: Reputation: 32
The typedef statement just creates a new name for an existing type.
Those two statements will create a called oid which is the same as either a u_long or u_char. Presumably those two lines don't actually exist one after another in a source file?

As for the second question, u_long and u_char are both themselves created with typedefs from the standard C types unsigned long and unsigned char.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
explain me some c code alaios Programming 4 11-28-2005 11:27 AM
User Preferences: Use HTML code instead of vB code? (vB code is overrated) stefanlasiewski LQ Suggestions & Feedback 5 07-26-2005 01:37 AM
explain this little script plz nukeu666 Linux - Newbie 4 08-18-2004 12:52 AM
plz plz solve my route mapping problem nedian123 Linux - Networking 1 07-12-2004 09:41 PM
can someone explain this error plz? santasballz Linux - Newbie 5 02-10-2004 01:18 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration