[問題] 可以幫忙Debug一下嗎?><
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <numeric>
using namespace std;
double K_hf=0.43,KaiA=1.3;
double A(double S);
double S;
double part1,part2,part3,part4,part5,part6,part7,part8,part9;
//做一個能夠讀Kxy就輸出已知的Kxy值的函式,如 K12表示Ksd,即由 S state形成 D
state的速率常數
double Kxy(int x,int y,double A)
{
static double const k0[4][4] = {{0,0,0,0},{0.21,0,0,0},{0,0,0,0.31},
{0.11,0,0,0}}; //(U,T,D,S)
static double const ka[4][4] = {{0,0.479077,0,0.0532308},
{0.0798462,0,0.212923,0},{0,0.1730000,0,-0.319385},{-0.3 ,0,0.505692,0}};
return k0[x][y] + ( ka[x][y]*A )/(K_hf+A) ;
}
double A(double S)
{
return std::max(0.0, KaiA-2*S );
}
part1=-Kxy(0,1,A)-Kxy(1,0,A)-Kxy(1,2,A);
part2=Kxy(2,1,A)-Kxy(0,1,A);
part3=-(0.479077*(-2*K_hf)/pow((K_hf+KaiA-2*S),2))*S-Kxy(0,1,A(S));
part4=Kxy(1,2,A(S));
part5= -Kxy(2,1,A(S))-Kxy(2,3,A(S));
part6=-(0.505692*(-2*K_hf)/pow((K_hf+KaiA-2*S),2))*S-Kxy(3,2,A(S));
part7=-Kxy(0,3,A(S));
part8=Kxy(2,3,A(S));
part9=-(-0.133077*(-2*K_hf)/pow((K_hf+KaiA-2*S),2))*S-
(0.505692*(-2*K_hf)/pow((K_hf+KaiA-2*S),2))*S-Kxy(0,3,A(S))
-Kxy(3,0,A(S))-Kxy(3,2,A(S));
int main()
{
cin>>S;
cout<<part1<<"\t"<<part2<<"\t"<<part3<<"\t"<<part4<<"\t"<<part5<<"\t"<<part6<<
"\t"<<part7<<"\t"<<part8<<"\t"<<part9<<endl;
system("pause");
return 0;
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.115.31.5
→
05/18 00:00, , 1F
05/18 00:00, 1F
錯誤訊息
C:\Users\Ben\Desktop\拜託盡量順吧.cpp:28: error: expected constructor,
destructor, or type conversion before '=' token
C:\Users\Ben\Desktop\拜託盡量順吧.cpp:28: error: expected `,' or `;' before
'=' token
C:\Users\Ben\Desktop\拜託盡量順吧.cpp:29: error: expected constructor,
destructor, or type conversion before '=' token
C:\Users\Ben\Desktop\拜託盡量順吧.cpp:29: error: expected `,' or `;' before
'=' token
C:\Users\Ben\Desktop\拜託盡量順吧.cpp:30: error: expected constructor,
destructor, or type conversion before '=' token
C:\Users\Ben\Desktop\拜託盡量順吧.cpp:30: error: expected `,' or `;' before
'=' token
C:\Users\Ben\Desktop\拜託盡量順吧.cpp:31: error: expected constructor,
destructor, or type conversion before '=' token
C:\Users\Ben\Desktop\拜託盡量順吧.cpp:31: error: expected `,' or `;' before
'=' token
C:\Users\Ben\Desktop\拜託盡量順吧.cpp:32: error: expected constructor,
destructor, or type conversion before '=' token
C:\Users\Ben\Desktop\拜託盡量順吧.cpp:32: error: expected `,' or `;' before
'=' token
C:\Users\Ben\Desktop\拜託盡量順吧.cpp:33: error: expected constructor,
destructor, or type conversion before '=' token
C:\Users\Ben\Desktop\拜託盡量順吧.cpp:33: error: expected `,' or `;' before
'=' token
C:\Users\Ben\Desktop\拜託盡量順吧.cpp:34: error: expected constructor,
destructor, or type conversion before '=' token
C:\Users\Ben\Desktop\拜託盡量順吧.cpp:34: error: expected `,' or `;' before
'=' token
C:\Users\Ben\Desktop\拜託盡量順吧.cpp:35: error: expected constructor,
destructor, or type conversion before '=' token
C:\Users\Ben\Desktop\拜託盡量順吧.cpp:35: error: expected `,' or `;' before
'=' token
C:\Users\Ben\Desktop\拜託盡量順吧.cpp:36: error: expected constructor,
destructor, or type conversion before '=' token
C:\Users\Ben\Desktop\拜託盡量順吧.cpp:36: error: expected `,' or `;' before
'=' token
※ 編輯: skylion 來自: 140.115.31.5 (05/18 00:06)
→
05/18 00:07, , 2F
05/18 00:07, 2F
→
05/18 00:08, , 3F
05/18 00:08, 3F
推
05/18 00:08, , 4F
05/18 00:08, 4F
→
05/18 00:10, , 5F
05/18 00:10, 5F
→
05/18 00:11, , 6F
05/18 00:11, 6F
推
05/18 00:12, , 7F
05/18 00:12, 7F
→
05/18 00:14, , 8F
05/18 00:14, 8F
→
05/18 00:20, , 9F
05/18 00:20, 9F
→
05/18 00:21, , 10F
05/18 00:21, 10F
→
05/18 00:24, , 11F
05/18 00:24, 11F
→
05/18 00:25, , 12F
05/18 00:25, 12F
※ 編輯: skylion 來自: 140.115.31.5 (05/18 00:32)
→
05/18 00:39, , 13F
05/18 00:39, 13F
→
05/18 00:39, , 14F
05/18 00:39, 14F
推
05/18 00:41, , 15F
05/18 00:41, 15F
→
05/18 00:41, , 16F
05/18 00:41, 16F
→
05/18 00:42, , 17F
05/18 00:42, 17F
→
05/18 00:42, , 18F
05/18 00:42, 18F
→
05/18 00:42, , 19F
05/18 00:42, 19F
→
05/18 00:42, , 20F
05/18 00:42, 20F
→
05/18 00:43, , 21F
05/18 00:43, 21F
→
05/18 00:44, , 22F
05/18 00:44, 22F
→
05/18 00:45, , 23F
05/18 00:45, 23F
→
05/18 00:47, , 24F
05/18 00:47, 24F
→
05/18 00:48, , 25F
05/18 00:48, 25F
推
05/18 00:55, , 26F
05/18 00:55, 26F
→
05/18 00:55, , 27F
05/18 00:55, 27F
→
05/18 10:34, , 28F
05/18 10:34, 28F
→
05/18 18:00, , 29F
05/18 18:00, 29F
→
05/19 16:40, , 30F
05/19 16:40, 30F
→
05/19 18:27, , 31F
05/19 18:27, 31F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章