读书人

帮小弟我看看是那里出错了吧

发布时间: 2012-02-23 22:01:35 作者: rapoo

帮我看看是那里出错了吧
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <ctype.h>
#include <string.h>


#define MAXOP 100
#define NUMBER '0 '
#define MAXVAL 100
#define BUFSIZE 100
#define NAME 'n '


int getop(char s[]);
void push(double);
double pop(void);
int getch(void);
void ungetch(int c);
double atof(char s[]);
void mathfnc(char s[]);
void clear(void);


编译的时候提示double atof(char s[]);这一句 类型不匹配在 'atof '的宣告
怎么改一下才行啊,我刚学的,不是太会

[解决办法]
double atof( const char *string );

改成这样:
double atof(char* s);
传个数组名,也就是首地址指针过去。

读书人网 >C语言

热点推荐