我编写了一个c++程序,测试时给出了一个莫名其妙的结果00b51096

这是源文件
using namespace std;
#include <iostream>

int text1(int);

int main()
{
cout << text1;
cin.get();
}

int text1(int)
{
return 25;
}
我想输出text1的值
求大神指点

  1 using namespace std;
  2 #include <iostream>
  3 
  4 int text1();                                                                                                                                                                                                                            
  5 
  6 int main()
  7 {
  8         cout << text1()<<endl;
  9             cin.get();
 10 }
 11 
 12 int text1()
 13 {
 14         return 25;
 15 }

温馨提示:答案为网友推荐,仅供参考
第1个回答  2016-08-10
using namespace std;
#include <iostream>

int text1(int);

int main()
{
cout << text1;
}

int text1(int)
{
int==25;
}追问

int == 25
错误原因:应输入标识符

相似回答