How can I get the CPU clock speed in C++?
I am running Ubuntu 9.10 if that makes any difference.
Read the pseudo-file /proc/cpuinfo. See this link for an explanation of the fields it contains.
/proc/cpuinfo