fork download
  1. #include <math.h>
  2.  
  3. int main(void){
  4. pow(2.0,7.0);
  5. //Works
  6.  
  7. double x = 3.0;
  8. pow(2.0,x);
  9. //Fails with error "undefined reference to 'pow'"
  10. return 0;
  11. }
Success #stdin #stdout 0s 1828KB
stdin
Standard input is empty
stdout
Standard output is empty