|
-
March 21st, 2008, 04:19 AM
#1
How to find the cpu architecture using C++ in Linux?
i am trying to find the architecture of a processor,i.e x64/x86, using c++. OS is Linux.
i would appreciate any help from u guys..
thanks.
-
March 21st, 2008, 07:01 AM
#2
Re: How to find the cpu architecture using C++ in Linux?
Is this related to C++? By the way, try the command uname. Check the man pages for the various options. Also, for further CPU info look into /proc/cpuinfo.
Can you help me with my homework assignment?, Before you post!, Use code tags, How to post!, Codeguru technical FAQs, C++ FAQ Lite, Stroustrup: C++ Style and Technique FAQ, Guru of the Week, Comeau C and C++ FAQs, Comeau C++ Templates FAQs, CUJ @ DDJ, Spam threshold
My Blogs : Learning C++ is fun | Abnegator's reflections
Open Threads : C++ Aha! Moments | Nature of work in C++?
-
March 21st, 2008, 07:44 AM
#3
Re: How to find the cpu architecture using C++ in Linux?
i need to do that thru' some code and moreover i tried that /proc/cpuinfo but it has no information about cpu architecture..
and if you know how to execute a command and get the result using c++ that'll also be very helpful..
thanks for the reply..
-
March 21st, 2008, 07:54 AM
#4
Re: How to find the cpu architecture using C++ in Linux?
What does uname -all give? I cannot look at the man right now. But see if there is an API that helps with that or you could simply make a system call.
Can you help me with my homework assignment?, Before you post!, Use code tags, How to post!, Codeguru technical FAQs, C++ FAQ Lite, Stroustrup: C++ Style and Technique FAQ, Guru of the Week, Comeau C and C++ FAQs, Comeau C++ Templates FAQs, CUJ @ DDJ, Spam threshold
My Blogs : Learning C++ is fun | Abnegator's reflections
Open Threads : C++ Aha! Moments | Nature of work in C++?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|