小编Ula*_*aga的帖子

'pow'未在此范围内声明

#include <iostream>
#include <string.h>

using namespace std;

int main()
{
    int e=0;
    int b=0;
    cout<<"Enter Exponent";
    cin>>e;
    cout<<"Enter Base";
    cin>>b;
    pow(e, b);
    cout<<"Power:"<<e;
    return 0;
}

void pow(int e, int b)
{
  int t=1;
  while(b==t)
  {
    e=e*b;
    t++;
  }
}
Run Code Online (Sandbox Code Playgroud)

ulaga.cpp | 29 |错误:'pow'未在此范围内声明

任何人都能解释为什么会出现这个错误吗

c++

1
推荐指数
3
解决办法
1万
查看次数

标签 统计

c++ ×1