当前位置: 首页>>代码示例>>C++>>正文


C++ PrintInt函数代码示例

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


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

示例1: PrintInt

void CCharShape::PrintNode (size_t idx) const {
	TCharNode *node = Nodes[idx];
	PrintInt ("node: ", (int)node->node_name);
	PrintInt ("parent: ", (int)node->parent_name);
	PrintInt ("child: ", (int)node->child_name);
	PrintInt ("next: ", (int)node->next_name);
}
开发者ID:dbluelle,项目名称:pandora-extremetuxracer,代码行数:7,代码来源:tux.cpp

示例2: PrintInt

void CCharShape::PrintNode (int idx) {
	TCharNode *node = Nodes[idx];
	PrintInt ("node: ",node->node_name);
	PrintInt ("parent: ", node->parent_name);
	PrintInt ("child: ", node->child_name);
	PrintInt ("next: ", node->next_name);
}
开发者ID:RKSimon,项目名称:extremetuxracer,代码行数:7,代码来源:tux.cpp

示例3: HTTPPrint_onOffCommand

void HTTPPrint_onOffCommand(void)
{
	int channelNo = GetChannelNumberWithChannelTypeCheck(ONOFF_W_KEY);
	if (!channelNo)
		channelNo = GetChannelNumberWithChannelTypeCheck(ONOFF_W_BUTTON);
	if (!channelNo)
		channelNo = GetChannelNumberWithChannelTypeCheck(ONOFF_COMMAND);
	if (!channelNo)
		channelNo = GetChannelNumberWithChannelTypeCheck(ONOFF_PULSE);
	if (channelNo)
	{
		if (channels[channelNo - 1].channelType == ONOFF_COMMAND || channels[channelNo - 1].channelType == ONOFF_PULSE)
		{
			PrintInt(channels[channelNo -1].channelStatus.onOffCommand.pinCommand);
		}
		else
		{
			PrintInt(channels[channelNo -1].channelStatus.onOff.channelPins.pinCommand);
		}
	}
	else
	{
		TCPPutROMString(sktHTTP, NOT_DEF_STR);
	}
}
开发者ID:openha,项目名称:wifihomeautomation,代码行数:25,代码来源:HTTPApp.c

示例4: DisplayPNames

void DisplayPNames(void)
{
  char Word[15];
  int i,k;
/*  int kk; */
  long l;

  Print(27,22,0,15,SuchStr);
  for (i=0;i<22;i++) {
    if (i>=PNames)
      Print(2,i+2,0,15,"                    ");
    else {
      Entry=E; Entry+=PName[Pos+i].Num;
      if (Entry->Mark==1) k=1; else k=0;
      if (k==0) PrintInt(2,i+2,0,15,Pos+i+1); else PrintInt(2,i+2,HGR,15,Pos+i+1);
      memset(Word,32,15);
      strcpy(Word,Entry->RName);
      Word[strlen(Word)]=32; Word[14]=0;
      if (k==0) Print(7,i+2,0,15,Word); else Print(7,i+2,HGR,15,Word);
      l=Entry->RLength;
      if (k==0) PrintZahl(16,i+2,0,15,l); else PrintZahl(16,i+2,HGR,15,l);
    }
  }
  PrintInt(2,CPos,7,15,Pos+CPos-1);
  Entry=E; Entry+=PName[Pos+CPos-2].Num;
  memset(Word,32,15);
  strcpy(Word,Entry->RName);
  Word[strlen(Word)]=32; Word[14]=0;
  Print(7,CPos,7,15,Word);
  l=Entry->RLength;
  PrintZahl(16,CPos,7,15,l);
  DisplayInfo();
  i=PName[Pos+CPos-2].UsedInTex; if (i<999) Print(55,8,0,7,TEntry[PName[Pos+CPos-2].UsedInTex].TName);
}
开发者ID:fielder,项目名称:NWT,代码行数:34,代码来源:pnames.c

示例5: PrintFP

/* print a double to a stream without using printf/sprintf */
void PrintFP(double Num, struct OutputStream *Stream)
{
    int Exponent = 0;
    int MaxDecimal;
    
    if (Num < 0)
    {
        PrintCh('-', Stream);
        Num = -Num;    
    }
    
    if (Num >= 1e7)
        Exponent = log10(Num);
    else if (Num <= 1e-7 && Num != 0.0)
        Exponent = log10(Num) - 0.999999999;
    
    Num /= pow(10.0, Exponent);    
    PrintInt((long)Num, 0, FALSE, FALSE, Stream);
    PrintCh('.', Stream);
    Num = (Num - (long)Num) * 10;
    if (abs(Num) >= 1e-7)
    {
        for (MaxDecimal = 6; MaxDecimal > 0 && abs(Num) >= 1e-7; Num = (Num - (long)(Num + 1e-7)) * 10, MaxDecimal--)
            PrintCh('0' + (long)(Num + 1e-7), Stream);
    }
    else
        PrintCh('0', Stream);
        
    if (Exponent != 0)
    {
        PrintCh('e', Stream);
        PrintInt(Exponent, 0, FALSE, FALSE, Stream);
    }
}
开发者ID:fjrti,项目名称:remix,代码行数:35,代码来源:clibrary.c

示例6: printf

/*******************************************************************************
* LGScene::writeToFile
*******************************************************************************/
int LGScene::writeToFile (char* cpFilename) {
	FILE* fpFile;		// Output file

	// Open output file
	if (!(fpFile = fopen (cpFilename, "wb"))) {

		// Print error
		printf ("Error opening file: %s", cpFilename);

		// Return error
		return (-1);
	}

	// Print header id
	PrintChunkID (fpFile, "SCN");

	// Print chunk size
	PrintInt (fpFile, LGScene::getChunkSize ());

	// Print number of objects
	PrintInt (fpFile, LGScene::iNrOfObjects);

	// Print objects
	for (int iCount = 0; iCount < LGScene::iNrOfObjects; iCount++) {

		// Write object
		LGScene::opObjects[iCount].write (fpFile);
	}

	// Close file
	fclose (fpFile);

	// Return no error
	return (0);
}
开发者ID:robgietema,项目名称:subzero_editor,代码行数:38,代码来源:lg_scene.cpp

示例7: PrintFloat

void PrintFloat(float val)
{
    //always prints 5 places
    int i = val*100;
    int pflag = 0;
    int thous    = i/10000;
    int hund     = i/1000 - thous*10;
    int tenth    = i/100  - thous*100   - hund*10;
    int dectenth = i/10   - thous*1000  - hund*100  - tenth*10;
    int dechund  = i/1    - thous*10000 - hund*1000 - tenth*100 - dectenth*10;
    if(thous && !pflag){
        PrintInt(thous);
        pflag = 1;
    }
    else{
        PrintString(" ");
    }
    if(hund){
        PrintInt(hund);
        pflag = 1;
    }
    else{
        PrintString(" ");
    }
    PrintInt(tenth);

    PrintString(".");
    PrintInt(dectenth);
    PrintInt(dechund);
}
开发者ID:Kchymet,项目名称:Digistockey,代码行数:30,代码来源:lcd.c

示例8: main

int main()
{
    CyGlobalIntDisable;
    isr_sw_StartEx(SW_Int);

    
    CyGlobalIntEnable;      /* Enable global interrupts */

    UART_1_Start();
    Timer_1_Start();
    Timer_2_Start();
    
    
    for(;;)
    {

      if(press == 2){
            
                        
            time_s = abs(seconds_new - seconds_old)/1000;
            time_ms = (ms_old + 24000 - ms_new);
            
            UART_1_UartPutString("\n \r Time Between Presses: ");
            PrintInt(time_s);
            UART_1_UartPutString(".");
            PrintInt(time_ms);
            UART_1_UartPutString(" s");
            press = 0; 
        }
}
}
开发者ID:eshamidi,项目名称:PSoC2016,代码行数:31,代码来源:main.c

示例9: main

int
main()
{
    int array[SIZE], i, k, sum;
    unsigned start_time, end_time;
    
    start_time = GetTime();
    for (k=0; k<OUTER_BOUND; k++) {
       for (i=0; i<SIZE; i++) sum += array[i];
       PrintInt(k);
    }
    end_time = GetTime();
    PrintChar('\n');
    PrintString("Total sum: ");
    PrintInt(sum);
    PrintChar('\n');
    PrintString("Start time: ");
    PrintInt(start_time);
    PrintString(", End time: ");
    PrintInt(end_time);
    PrintString(", Total time: ");
    PrintInt(end_time-start_time);
    PrintChar('\n');
    return 0;
}
开发者ID:arikj,项目名称:NACHOS,代码行数:25,代码来源:testloop.c

示例10: DisplayFiles

void DisplayFiles(void)
{
  char Word[17];
/*  long l; */
  int i;

  Print(27,22,0,15,SuchStr); Print(18,1,1,1,"     ");

  if (Dateien==0) {
	 for (i=0;i<22;i++) Print(2,i+2,0,15,"                    ");
	 return;
  }

  Datai=Da; Datai+=Pos;
  for (i=0;i<22;i++) {
	 if (i>=Dateien)
		Print(2,i+2,0,15,"                    ");
	 else {
		PrintInt(2,i+2,0,15,Pos+i+1);
		memset(Word,32,16); strcpy(Word,Datai->FileName);
		Word[strlen(Word)]=32; Word[15]=0;
		Print(7,i+2,0,15,Word);
		if (Datai->Date==0) Print(19,i+2,0,15,"DIR");
		Datai++;
	 }
  }
  PrintInt(2,CPos,7,15,Pos+CPos-1);
  Datai=Da; Datai+=Pos+CPos-2;
  memset(Word,32,16);
  strcpy(Word,Datai->FileName);
  Word[strlen(Word)]=32; Word[15]=0;
  Print(7,CPos,7,15,Word);
  if (Datai->Date==0) Print(19,CPos,7,15,"DIR");
}
开发者ID:fielder,项目名称:NWT,代码行数:34,代码来源:filepart.c

示例11: main

int main(void){
	int a = 1;
	int b = 2;
	int c = 3;
	
	PrintInt(FiveTimes(a));
	PrintInt(FiveTimes(b));
	PrintInt(FiveTimes(c));
	return 0;
}
开发者ID:howardking,项目名称:CodeDomain,代码行数:10,代码来源:pazzle14.c

示例12: main

int main()
{
	int a=1,b=2,c=3;

	PrintInt(FiveIimes(a));
	PrintInt(FiveIimes(b));
	PrintInt(FiveIimes(c));

	return 0;
}
开发者ID:daige,项目名称:c-puzzles,代码行数:10,代码来源:32.c

示例13: main

int main(int argc, char **argv)
{
    int a = 1, b = 2, c = 3;

    PrintInt(FiveTimes(a));
    PrintInt(FiveTimes(b));
    PrintInt(FiveTimes(c));

    return 0;
}
开发者ID:linzhenhua,项目名称:src,代码行数:10,代码来源:main11.c

示例14:

void	CAStreamBasicDescription::PrintToLog(const AudioStreamBasicDescription& inDesc)
{
	PrintFloat		("  Sample Rate:        ", inDesc.mSampleRate);
	Print4CharCode	("  Format ID:          ", inDesc.mFormatID);
	PrintHex		("  Format Flags:       ", inDesc.mFormatFlags);
	PrintInt		("  Bytes per Packet:   ", inDesc.mBytesPerPacket);
	PrintInt		("  Frames per Packet:  ", inDesc.mFramesPerPacket);
	PrintInt		("  Bytes per Frame:    ", inDesc.mBytesPerFrame);
	PrintInt		("  Channels per Frame: ", inDesc.mChannelsPerFrame);
	PrintInt		("  Bits per Channel:   ", inDesc.mBitsPerChannel);
}
开发者ID:NikolaiUgelvik,项目名称:sooperlooper,代码行数:11,代码来源:CAStreamBasicDescription.cpp

示例15: main

int main (void) {
	unsigned int data[2];
	Init();
	while(1) {
		LineData(data);
		PrintInt(data[LEFT]);
		SerPrint("\n");
		PrintInt(data[RIGHT]);
		SerPrint("\n\n\n");
		Msleep(500);
	}
}
开发者ID:lluchs,项目名称:asuro,代码行数:12,代码来源:ain.c


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