title: power of an integer in c++
body: <p>I need to get the result from <code>pow(a,b)</code> as an integer (both a and b are integers too). currently the calculations where <code>(int) pow( (double)a, (double)b)</code> is included are wrong. Maybe someone can help with a function that does the pow(a,b) with integers and returns an integer too?</p>
  
  <p>But here is the odd part: I made my script in Linux with Geany (and g++/gcc compiler) and had just <code>pow(a,b)</code> the script compiled and worked fine. But in university I have Dev-C++ (and MS Windows). In Dev-C++ the script didn't compile with an error <code>[Warning] converting to</code>int' from <code>double'</code></p>
  
  <p>I need to make this scrpit work under Windows (and Mingw compiler) too.</p>