如何将参数传递给另一个被称为参数的函数

时间:2017-09-28 11:15:00

标签: c++ parameter-passing function-call

我有一个如下所示的功能:

SELECT 
[Extent1].[Id] AS [Id], 
[Extent1].[SubjectId] AS [SubjectId], 
[Extent1].[SeriesId] AS [SeriesId], 
[Extent1].[Title] AS [Title], 
[Extent1].[Author] AS [Author], 
[Extent1].[ISBN] AS [ISBN], 
[Extent1].[Edition] AS [Edition], 
[Extent1].[Price] AS [Price], 
[Extent1].[Discount] AS [Discount], 
[Extent1].[BoardId] AS [BoardId], 
[Extent1].[ClassId] AS [ClassId]
FROM [dbo].[tblCataLogue] AS [Extent1]
ORDER BY covnert(int,[Extent1].[ClassId]) ASC

...而且函数bool setJavaScript(int time , const str::string text) { d->setJavaTimeOut(time, &shouldTerminate); } 是这样的:

shouldTerminate

现在,我想在bool shouldTerminate(JSContextRef ctx, void* context) { } 中访问text中的变量setJavaScript,我该怎么做?

两个函数都在同一个文件中。

变量shouldTerminate已由另一个来自不同文件的函数发送。

0 个答案:

没有答案