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.
Printable View
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.
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.
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..
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.