QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 872|回复: 0

编译通不过??????

[复制链接]
发表于 2006-3-8 19:21:07 | 显示全部楼层 |阅读模式
#include <iostream>
#include <math.h>

using namespace std;

int main (int argc, char *argv[])
{
        struct complex val =  {4.0, 2.0};
        double result = cabs (val);
        cout << "result = " << result << endl;

        return 0;
}
g++ 4.0.3
temp.cpp: In function ‘int main(int, char**)’:
temp.cpp:8: error: variable ‘complex val’ has initializer but incomplete type
temp.cpp:9: error: ‘cabs’ was not declared in this scope
您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-2 20:25 , Processed in 0.044611 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表