你应该把#include<iostream.h>
class liumengyang
{
private:
int t
public:
int v(int l1,int h1,int s1)
}
int liumengyang::v(int l1,int h1,int s1)
{
t=l1*h1*s1
return t
}
放在一个放在一个.h文件中,此文件取名为liumengyang.h
然后再cpp文件里添加include "liumengyang.h"就行了
问题:splint *.c时报错Cannot find include file stdio.h on search path
解决:
include环境变量里增加stdio.h所在的路径,即:D:\MinGW\include
【1】include头文件路径
除了默认的/usr/include, /usr/local/include等include路径外,还可以通过设置环境变量来添加系统include的路径:
# C
export C_INCLUDE_PATH=XXXX:$C_INCLUDE_PATH
# CPP
export CPLUS_INCLUDE_PATH=XXX:$CPLUS_INCLUDE_PATH
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)