File2.cpp which contains the following code below
#include "File2.h"
//some codes in between
static float File2::computeData(string s,int a,int b,float c,float d)
{
float result;
//the compute code
return result;
}
在File2.h有一個功能,我想在我的類來聲明它
Class File2
{
private:
//some variables
public:
static float computeData(string,int,int,float,float);
};
我得到那個說不能聲明成員的錯誤函數靜態浮動Data :: computeData(std :: string,int,int,float,float)有靜態鏈接[-fpermissive]
then then .. at
Main.cpp的
我試圖使用功能
#include "File2.h"
float result;
result = computeData(string s,int a,int b,float c,float d);
,它給我computeData沒有在這個範圍內聲明..
衷心感謝所有幫助!