LinuxQuestions.org
Help answer threads with 0 replies.
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 09-01-2002, 05:22 AM   #1
boku
Member
 
Registered: Aug 2002
Location: Sweden
Distribution: Gentoo
Posts: 43

Rep: Reputation: 15
sizeof() and C/C++


I would like to have a header file containing the typedefs for various types:

typedef unsigned int u32;

How do make sure that u32 will be exactly 32 bits long on all possible systems?

Thanks!
 
Old 09-01-2002, 06:30 AM   #2
sarin
Member
 
Registered: May 2001
Location: India, Kerala, Thrissur
Distribution: FC 7-10
Posts: 354
Blog Entries: 2

Rep: Reputation: 34
See /usr/include/linux/types.h. I think they have something that is always "n" bits.
--Sarin
 
Old 09-01-2002, 07:31 AM   #3
boku
Member
 
Registered: Aug 2002
Location: Sweden
Distribution: Gentoo
Posts: 43

Original Poster
Rep: Reputation: 15
Yes, thanks. That was what I was looking for.
 
  


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
sizeof and malloc in C exvor Programming 4 08-07-2005 12:06 PM
different results for sizeof structures linetnew Programming 7 04-18-2005 04:44 AM
sizeof applied on a struct George_gk Programming 9 04-07-2005 03:06 AM
sizeof( ) in c++ question amoor757 Programming 6 01-26-2004 02:42 PM
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 05:01 PM.

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