• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ Go函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中Go函数的典型用法代码示例。如果您正苦于以下问题:C++ Go函数的具体用法?C++ Go怎么用?C++ Go使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了Go函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: CurrentPattern

void RRPathingProperty::ProcessMessage(Message * message)
{
	PathPattern * pp = CurrentPattern();
	if (pp == 0)
		return;

	if (message->msg == "RRMovingProperty::DistanceMovedZero")
	{
		LogMain(owner->name+" distance moved zero. Restarting pathing", DEBUG);
		/// Just issue Stop() again?
		Do();
//		Go();
	}
	

	switch(pp->type)
	{
		case PathPattern::RANDOM:
		case PathPattern::GO_HOME:
			if (message->msg == "DestinationReached")
				Go();
			if (message->msg == "PathableProperty::ZeroLengthPathReceived")
				Go();
			if (message->msg == "RRMovingProperty::DistanceMovedZero")
			{
				LogMain(owner->name+" distance moved zero. Restarting pathing", DEBUG);
				Go();
			}
			break;
	};
}
开发者ID:erenik,项目名称:RuneRPG,代码行数:31,代码来源:RRPathingProperty.cpp


示例2: Go

void Go(int Pos)
{
  int i;

  if (Pos == N)
  {
    double prod = 1;

    for (i = 0; i < N; i++)

      prod *= A[i][P[i]];
    if (Parity == 0)
      sum += prod;
    else 
      sum -= prod;
    return;
  }
  else 
  {
    
    Go(Pos + 1);
    for (i = Pos + 1; i < N; i++)
    {
      Swap(&P[Pos], &P[i]);
      Parity = !Parity;
      Go(Pos + 1);
      Swap(&P[Pos], &P[i]);
      Parity = !Parity;
    }  
  }
}  
开发者ID:AleksandraSimonova,项目名称:SUM2016,代码行数:31,代码来源:t05det1.c


示例3: WXUNUSED

void MyFrame::OnGo(wxCommandEvent& WXUNUSED(event))
{
      passNumber = 1;
      errorCount = 0;
      menuBar->EnableTop(0, false);
      menuBar->EnableTop(1, false);
      menuBar->EnableTop(2, false);
      menuBar->EnableTop(3, false);
      textWindow->Clear();
      Tex2RTFYield(true);
      Go();

      if (stopRunning)
      {
#if wxUSE_STATUSBAR
        SetStatusText(_T("Build aborted!"));
#endif // wxUSE_STATUSBAR
        wxString errBuf;
        errBuf.Printf(_T("\nErrors encountered during this pass: %lu\n"), errorCount);
        OnInform((wxChar *)errBuf.c_str());
      }


      if (runTwice && !stopRunning)
      {
        Tex2RTFYield(true);
        Go();
      }
      menuBar->EnableTop(0, true);
      menuBar->EnableTop(1, true);
      menuBar->EnableTop(2, true);
      menuBar->EnableTop(3, true);
}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:33,代码来源:tex2rtf.cpp


示例4: Go

void Go( int Pos )
{
    int i, x, save;

    if (Pos == N)
    {
        for (i = 0; i < N; i++)
            Write(p[i]);
        for (i = 0; i < N; i++)
            printf("%i", p[i]);
        printf(" - %s\n", Parity ? "odd" : "even");
        return;
    }

    else
    {
        save = Parity;
        Go(Pos + 1);
        for (i = Pos + 1; i < N; i++)
        {
            Parity = !Parity;
            Swap(&p[Pos], &p[i]);
            Go(Pos + 1);
        }

        Parity = save;
        x = p[Pos];

        for (i = Pos + 1; i < N; i++)
            p[i - 1] = p[i];
        p[N - 1] = x;
    }
}
开发者ID:AB1a,项目名称:SUM2015,代码行数:33,代码来源:T03PERM.C


示例5: GetRandomNextSong

void Controller::GoNext(BOOL blnNext)
{
	if(Profile::intRepeat == REPEAT_ENDLESSRANDOM || Profile::intRepeat == REPEAT_RANDOM)
	{
		// ランダム再生の場合

		// 前の曲には移動できない
		if(!blnNext)
		{
			return;
		}

		UINT uiNextSong = GetRandomNextSong();
		if(uiNextSong != -1)
		{
			// ランダム再生で次の曲がある場合
			Go(uiNextSong);
		}
		else
		{
			// そうでない場合は、次の曲へ
			SendMessage(pMainWnd->GetWinampWindow(), WM_COMMAND, WINAMP_BUTTON5, 0);
		}
	}
	else
	{
		// ランダム再生でない場合
		Go(pMainWnd->GetCurSong() + (blnNext ? 1 : -1)) ;
	}
}
开发者ID:nitoyon,项目名称:winamp-zipmp3plugin,代码行数:30,代码来源:Controller.cpp


示例6: Go

void EDIT_TOOL::setTransitions()
{
    Go( &EDIT_TOOL::Main,       COMMON_ACTIONS::editActivate.MakeEvent() );
    Go( &EDIT_TOOL::Rotate,     COMMON_ACTIONS::rotate.MakeEvent() );
    Go( &EDIT_TOOL::Flip,       COMMON_ACTIONS::flip.MakeEvent() );
    Go( &EDIT_TOOL::Remove,     COMMON_ACTIONS::remove.MakeEvent() );
    Go( &EDIT_TOOL::Properties, COMMON_ACTIONS::properties.MakeEvent() );
}
开发者ID:LDavis4559,项目名称:kicad-source-mirror,代码行数:8,代码来源:edit_tool.cpp


示例7: Go

void EDIT_TOOL::SetTransitions()
{
    Go( &EDIT_TOOL::Main,       COMMON_ACTIONS::editActivate.MakeEvent() );
    Go( &EDIT_TOOL::Rotate,     COMMON_ACTIONS::rotate.MakeEvent() );
    Go( &EDIT_TOOL::Flip,       COMMON_ACTIONS::flip.MakeEvent() );
    Go( &EDIT_TOOL::Remove,     COMMON_ACTIONS::remove.MakeEvent() );
    Go( &EDIT_TOOL::Properties, COMMON_ACTIONS::properties.MakeEvent() );
    Go( &EDIT_TOOL::MoveExact,  COMMON_ACTIONS::moveExact.MakeEvent() );
    Go( &EDIT_TOOL::Duplicate,  COMMON_ACTIONS::duplicate.MakeEvent() );
    Go( &EDIT_TOOL::Duplicate,  COMMON_ACTIONS::duplicateIncrement.MakeEvent() );
    Go( &EDIT_TOOL::CreateArray,COMMON_ACTIONS::createArray.MakeEvent() );
    Go( &EDIT_TOOL::editFootprintInFpEditor, COMMON_ACTIONS::editFootprintInFpEditor.MakeEvent() );
}
开发者ID:OpenEE,项目名称:micad,代码行数:13,代码来源:edit_tool.cpp


示例8: Go

void DRAWING_TOOL::SetTransitions()
{
    Go( &DRAWING_TOOL::DrawLine,         COMMON_ACTIONS::drawLine.MakeEvent() );
    Go( &DRAWING_TOOL::DrawCircle,       COMMON_ACTIONS::drawCircle.MakeEvent() );
    Go( &DRAWING_TOOL::DrawArc,          COMMON_ACTIONS::drawArc.MakeEvent() );
    Go( &DRAWING_TOOL::DrawDimension,    COMMON_ACTIONS::drawDimension.MakeEvent() );
    Go( &DRAWING_TOOL::DrawZone,         COMMON_ACTIONS::drawZone.MakeEvent() );
    Go( &DRAWING_TOOL::DrawKeepout,      COMMON_ACTIONS::drawKeepout.MakeEvent() );
    Go( &DRAWING_TOOL::PlaceText,        COMMON_ACTIONS::placeText.MakeEvent() );
    Go( &DRAWING_TOOL::PlaceDXF,         COMMON_ACTIONS::placeDXF.MakeEvent() );
    Go( &DRAWING_TOOL::SetAnchor,        COMMON_ACTIONS::setAnchor.MakeEvent() );
}
开发者ID:hzeller,项目名称:kicad-source-mirror,代码行数:12,代码来源:drawing_tool.cpp


示例9: Go

int CarBotCon::Forward(int vel)
{
	if ((vel>100) || (vel<0))
		return -1;
	return Go(vel, 0);

}
开发者ID:MojtabaKarimi,项目名称:AUT-UofM-Walk-Engine,代码行数:7,代码来源:CarBotCon.cpp


示例10: main

int main(){
	int i,j,k;
	scanf("%d %d",&n,&m);
	memset(st,-1,sizeof(st));
	ln=0;
	for (i=1;i<n;i++){
		scanf("%d %d",&j,&k);
		in_edge(j,k);
		in_edge(k,j);
	}
	memset(tag,0,sizeof(tag));
	memset(root,-1,sizeof(root));
	for (i=1;i<=n;i++) father[i]=i;
	tn=0;
	dfs(1);
	if (tot[1]<m){
		memset(tag,0,sizeof(tag));
		k=Go(1);
		father[1]=k;
	}
	printf("%d\n",tn);
	for (i=1;i<=n;i++) printf("%d ",f[Find(i)]);
	printf("\n");
	for (i=1;i<=tn;i++) printf("%d ",root[i]);
	printf("\n");
	return 0;
}
开发者ID:TRYang,项目名称:acm,代码行数:27,代码来源:sgu_216.cpp


示例11: Go

void Go(int Pos)
{
  int i;
  if(Pos == N)
  {
    Write();
    return;
  }
  else
  {
    /*save = Par;
    Go(Pos + 1);
    for(i = Pos + 1; i < N; i++)
    {
      Par = !Par;
      Swap(&P[Pos], &P[i]);
      Go(Pos + 1);
    }
    Par = save;
    x = P[Pos];
    for(i = Pos + 1; i < N; i++)
      P[i - 1] = P[i];
    P[N - 1] = x;*/
    for(i = Pos; i < N; i++)
    {
      if(Pos != i)
        Par = !Par;
      Swap(&P[Pos], &P[i]);
      Go(Pos + 1);
      if(Pos != i)
        Par = !Par;
      Swap(&P[Pos], &P[i]);
    }
  }
}
开发者ID:lisenok2000,项目名称:sum2015,代码行数:35,代码来源:T03PERM.c


示例12: Exec_Go

zOPER_EXPORT zLONG OPERATION
Exec_Go( zVIEW vSubtask )
{
   zLONG  lRC = 0;
   zPVOID hWRKS;

   // initialize work storage manager
   if ( WRKS_Init( &hWRKS ) < 0 )
   {
      // Error in WRKS system
      MessageSend( vSubtask, "VM03002", "VML Interpretor",
                   "Error Initializing Work Storage",
                   zMSGQ_OBJECT_CONSTRAINT_ERROR, zBEEP );
      TraceLineS( "VML Interpreter Error ","Initializing Work Storage" );
      return( zXC_OPERATION_EXECUTED );
   }

   if ( setjmp( g_jbWRKS ) != 0 )
   {
      // Error return from longjmp
      WRKS_Close( &hWRKS );
      return( zXC_STEP_EXECUTED );
   }

   lRC = Go( vSubtask, hWRKS, &lRC );

   // close work storage manager
   WRKS_Close( &hWRKS );

   return( lRC );
}
开发者ID:DeegC,项目名称:10d,代码行数:31,代码来源:tzvminaa.c


示例13: In2_davhi

static void In2_davhi(int tr)
{
    parallel_emu_set_ndac(1);
    parallel_emu_set_nrfd(0);

    Go(In1);
}
开发者ID:twinaphex,项目名称:vice-next,代码行数:7,代码来源:parallel.c


示例14: Go

void Go( int Pos )
{
  int i;
  if (Pos == N)
  {
    SavePerm();
    return;
  }
  else
  {
    for (i = Pos; i < N; i++)
    {
      if (Pos != i)
      {
        parity = !parity;
        Swap(&P[Pos], &P[i]);
      }
      Go(Pos + 1);
      if (Pos != i)
      {
        parity = !parity;
        Swap(&P[Pos], &P[i]);
      }
    }
  }
}
开发者ID:1fanfan1,项目名称:SUM2016,代码行数:26,代码来源:T04PERM.C


示例15: main

void main( void )
{
  int i;
  for (i = 0; i < N; i++)
    P[i] = i + 1;
  Go(0);    
}
开发者ID:1fanfan1,项目名称:SUM2016,代码行数:7,代码来源:T04PERM.C


示例16: main

int main(int argc, char *argv[])
{
    SchListConstructor L;
    try {
        printf("Eratosfen's algorythm. InteLib Scheme demo\n"
               "(c) Andrey Vikt. Stolyarov 2007\n"
               "This is free software. See GNU GPL v.2 for details\n\n");
        printf("Trying to initialize the Scheme code... ");
        SchemeInit_eratosf();
        printf("finished\n");
        SchReference Go((L| ERATOSFEN, argc > 1 ? atol(argv[1]) : 100L ));
        SchReference res = Go.Evaluate();
        printf("%s\n", res.TextRepresentation().c_str());
        printf("Done.\n");
    }
    catch(IntelibX &x) {
        printf("\nCaught IntelibX: %s\n", x.Description() );
        if(x.Parameter().GetPtr()) {
            printf("%s\n", x.Parameter()->TextRepresentation().c_str());
        }
    }
    catch(...) {
        printf("Something strange caught\n");
    }
    return 0;
}
开发者ID:iley,项目名称:intelib,代码行数:26,代码来源:main.cpp


示例17: main

int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        printf("Usage: %s [RR] | [LOT] | [FCFS] \n", argv[0]);
        return 1;
    }
    else if (strcmp(argv[1], "RR") == 0)
    {
        setup(0); // RR
    }
    else if (strcmp(argv[1], "LOT") == 0)
    {
        setup(1); // LOT
    }
    else if (strcmp(argv[1], "FCFS") == 0)
    {
        setup(2); // FCFS
    }	
    else
    {
        return 1;
    }


    CreateThread(sleep_test, 10);          // 2
    CreateThread(simple_thread, 10);        // 0
    CreateThread(simple_thread, 1);        // 1
    CreateThread(simple_thread, 5);        // 3
	

    Go();

    return 0;
}
开发者ID:P4RTI4L,项目名称:Thread-Scheduler,代码行数:35,代码来源:TestFile4.c


示例18: Init

int ECHARM_manager::RunDYNECHARM(ECHARM_file_save* info_save,int vNumberOfParticles = 0){
    if(vNumberOfParticles != 0){
        fNumberOfParticles = vNumberOfParticles;
    }

    Init();
    
#pragma omp single
    {
        Print();
    }
    
#pragma omp for schedule(dynamic)
    for(int iPart=0;iPart<vNumberOfParticles;iPart++){
        
        Go();
        
#pragma omp critical
        {
            fInfo->SetPartNum(iPart);
            info_save->Save(fInfo);
            if((iPart%fNumberOfParticlesPrint)==0){
                std::cout << "Particle - " << iPart << std::endl;
            }
            
        }
    }
    End();
    return 0;
}
开发者ID:ebagli,项目名称:ECHARM_CXX,代码行数:30,代码来源:ECHARM_manager.cpp


示例19: GoToAddr

void GoToAddr( address addr )
{
    if( IS_NIL_ADDR( addr ) ) return;
    SetTempBreak( addr );
    Go( TRUE );
    NullStatus( &UserTmpBrk );
}
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:7,代码来源:dbgmisc.c


示例20: Go

void Go( int Pos ) 
{ 
  int i; 
  double prod = 1; 

  if (Pos == n) 
  { 
    for (i = 0; i < n; i++) 
    prod *= A[i][P[i]]; 

    if (Parity) 
    sum += prod; 
    else 
    sum -= prod; 

    return; 
  } 
  else 
  { 
    for (i = Pos; i < N; i++) 
    {
      Swap(&P[Pos], &P[i]); 
      if (Pos != i) 
      Parity = !Parity; 
      Go(Pos + 1); 
      if (Pos != i) 
      Parity = !Parity; 
      Swap(&P[Pos], &P[i]); 
    } 
  } 
} 
开发者ID:KleshchenkoSeva,项目名称:SUM2016,代码行数:31,代码来源:T05DET.C



注:本文中的Go函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GoodIter函数代码示例发布时间:2022-05-30
下一篇:
C++ GnbLibGetHeader函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap