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

C++ PutString函数代码示例

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

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



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

示例1: PutString

void TiXmlDeclaration::StreamOut( TIXML_OSTREAM * stream ) const
{
	(*stream) << "<?xml ";

	if ( !version.empty() )
	{
		(*stream) << "version=\"";
		PutString( version, stream );
		(*stream) << "\" ";
	}
	if ( !encoding.empty() )
	{
		(*stream) << "encoding=\"";
		PutString( encoding, stream );
		(*stream ) << "\" ";
	}
	if ( !standalone.empty() )
	{
		(*stream) << "standalone=\"";
		PutString( standalone, stream );
		(*stream) << "\" ";
	}
	(*stream) << "?>";
}
开发者ID:lorichen,项目名称:xgame,代码行数:24,代码来源:tinyxml.cpp


示例2: VT102DispStr

void VT102DispStr (INT8U x, INT8U y, char *s, INT8U fgcolor, INT8U bgcolor)
{
    INT8U err;

    OSSemPend(DispStrSem, 0, &err);                     /* Acquire semaphore to display string              */
    VT102Attribute(fgcolor, bgcolor);
    PutChar(0x1B);
    PutChar('[');
    PutDec(y);
    PutChar(';');
    PutDec(x);
    PutChar('H');
    PutString(s);
    OSSemPost(DispStrSem);                              /* Release semaphore                                */
}
开发者ID:SSexpress,项目名称:ele542-2011,代码行数:15,代码来源:test.c


示例3: PutString

void TiXmlAttribute::Print( FILE* cfile, int /*depth*/, TIXML_STRING* str ) const
{
	TIXML_STRING n, v;

	PutString( name, &n );
	PutString( value, &v );

	if (value.find ('\"') == TIXML_STRING::npos) {
		if ( cfile ) {
		fprintf (cfile, "%s=\"%s\"", n.c_str(), v.c_str() );
		}
		if ( str ) {
			(*str) += n; (*str) += "=\""; (*str) += v; (*str) += "\"";
		}
	}
	else {
		if ( cfile ) {
		fprintf (cfile, "%s='%s'", n.c_str(), v.c_str() );
		}
		if ( str ) {
			(*str) += n; (*str) += "='"; (*str) += v; (*str) += "'";
		}
	}
}
开发者ID:MrLobo,项目名称:El-Rayo-de-Zeus,代码行数:24,代码来源:tinyxml.cpp


示例4: BeginProgram

void BeginProgram(void)
{
	int i;

	ORG = 0;
	FloatNum = TempNum = 0;
	for (i = EAX; i <= EDI; ++i)
	{
		if (X86Regs[i] != NULL)
		{
			X86Regs[i]->link = NULL;
		}
	}

	PutString("# Code auto-generated by UCC\n\n");
}
开发者ID:descent,项目名称:ucc-code,代码行数:16,代码来源:x86linux.c


示例5: afficher_zone

void afficher_zone(void *adresse, size_t taille, int free) {
    decompte_zone(adresse, taille, free);
    PutString("\n");
    PutString("zone ");
    if(free)
    	PutString(" libre ");
    else
    	PutString(" occupee ");
    PutString(" adresse : ");
    PutInt((unsigned int)adresse);
    PutString(" taille : ");
    PutInt(taille);
    PutString("\n");
}
开发者ID:starfox644,项目名称:jjcgm2014B2,代码行数:14,代码来源:memtest.c


示例6: main

int main()
{
	OpenFileId id;
	char c;
	int n;
	if(Create("test", 128) == -1)
	{
		PutString("Erreur create\n");
		Exit(0);
	}
	id = Open("test");
	if(id == -1)
	{
		PutString("erreur open test\n");
		Exit(0);
	}
	if(Write("coucou\n", 7, id) != 7)
	{
		PutString("erreur write\n");
		Exit(0);
	}
	if(Close(id) == -1)
	{
		PutString("erreur close test\n");
		Exit(0);
	}

	id = Open("files/small");
	if(id == -1)
	{
		PutString("erreur open small\n");
		Exit(0);
	}
	while((n = Read(&c, sizeof(char), id)))
	{
		PutChar(c);
	}
	if(n == -1)
	{
		PutString("erreur read\n");
		Exit(0);
	}
	if(Close(id) == -1)
	{
		PutString("erreur close small\n");
		Exit(0);
	}
    return 0;
}
开发者ID:starfox644,项目名称:jjcgm2014B2,代码行数:49,代码来源:testFile.c


示例7: main

int main()
{
	PutString("\n-----------------------------------------\n");
	PutString("Lancement du test threadParallele3 : \n");
	PutString("Lance un thread qui lance un autre thread etc. (cree 3 threads).\n");
	PutString("Tous les threads doivent se terminer avant que le processus s'arrete.\n");
	PutString("-----------------------------------------\n");
	UserThreadCreate(f, 0);
	PutString("Thread main fini\n");
    return 0;
}
开发者ID:starfox644,项目名称:jjcgm2014B2,代码行数:11,代码来源:threadParallele3.c


示例8: main

int main()
{
	PutString("\n-----------------------------------------\n");
	PutString("Lancement du test threadMulJoin : \n");
	PutString("Test le Join multiple sur le meme thread.\n");
	PutString("Doit afficher \"Erreur join ...\".\n");
	PutString("-----------------------------------------\n");
	int tidf, tidg;
	tidg = UserThreadCreate(g, 0);
	tidf = UserThreadCreate(f, &tidg);
	if(UserThreadJoin(tidg, 0) == -1)
		PutString("Erreur join du main sur g\n");
	PutString("Fin du main\n");
    return 0;
}
开发者ID:starfox644,项目名称:jjcgm2014B2,代码行数:15,代码来源:threadMulJoin.c


示例9: printf

int
printf (const char *format, ...)
{
    char c, buffer[2048];
    va_list ap;
    va_start (ap, format);
    buffer[0] = 0;
    vsprintf (buffer, format, ap);
    va_end (ap);
    if ( x11_initialized ) {
        PutString (buffer);
        Redraw();
        return(0);
    } else {
        fprintf(stdout,"%s",buffer);
        return(0);
    }
}
开发者ID:cjg,项目名称:grads,代码行数:18,代码来源:pcx11e.c


示例10: trace

int trace(int line, char* file)
{
    KEY_STATUS KS;
    char buffer[256];

    memset(buffer, ' ', 80);
    snprintf(buffer, sizeof(buffer), "%s <%d>", file, line);
    strcpy(_buffer, buffer);
    PutString(1, 5, buffer);
    __dcache_writeback_all();
    _lcd_set_frame();
    _kbd_get_status(&KS);
    if (KS.status & CONTROL_BUTTON_START) {
        exit(0);
    }
    mdelay(500);
    return EXIT_SUCCESS;
}
开发者ID:markjreed,项目名称:vice-emu,代码行数:18,代码来源:archdep_dingoo.c


示例11: PutString

void TiXmlText::toStream( std::ostream& stream, int depth ) const
{
	if ( cdata )
	{
		int i;
		stream << "\n";
		for ( i=0; i<depth; i++ ) {
			stream << "    ";
		}
		stream << "<![CDATA[" << value << "]]>\n";
	}
	else
	{
		TIXML_STRING buffer;
		PutString( value, &buffer );
		stream << buffer;
	}
}
开发者ID:GreyGhost,项目名称:OpenAnno-Archive,代码行数:18,代码来源:tinyxml.cpp


示例12: Find_Card

void Find_Card(void)
{
    if(PcdRequest(0x52,Temp)==MI_OK)
    {
      if(Temp[0]==0x04&&Temp[1]==0x00)  
          PutString("MFOne-S50");
        else if(Temp[0]==0x02&&Temp[1]==0x00)
          PutString("MFOne-S70");
        else if(Temp[0]==0x44&&Temp[1]==0x00)
          PutString("MF-UltraLight");
        else if(Temp[0]==0x08&&Temp[1]==0x00)
          PutString("MF-Pro");
        else if(Temp[0]==0x44&&Temp[1]==0x03)
          PutString("MF Desire");
        else
          PutString("Unknown");
        PutString("SUCCESS!");
    }
    else PutString("Faile!");                                             
}
开发者ID:Derrick1024,项目名称:RFID-in-room,代码行数:20,代码来源:main.c


示例13: drawTrackLayoutGraph

void drawTrackLayoutGraph(char track) {
    char *trackA =
    "\033[2;44H"    "-- Track A --"
    "\033[4;24H"    "---------12--11----------------------------------\\"
    "\033[5;24H"    "-------4/   /  ---------13--------10-----------\\  \\"
    "\033[6;24H"    "          14--/           \\   |  /              \\  \\"
    "\033[7;24H"    "          /                \\  |/155              \\--9"
    "\033[8;24H"    "         |                156\\|                    |"
    "\033[9;24H"    "         |                    |\\154                |"
    "\033[10;24H"   "          \\               153/|  \\               /--8"
    "\033[11;24H"   "          15--\\            /  |   \\             /  /"
    "\033[12;24H"   "--------\\   \\  ----------S---------S-----------/  /"
    "\033[13;24H"   "---------1\\  \\---------6------------7------------/"
    "\033[14;24H"   "-----------2\\           \\          /"
    "\033[15;24H"   "-------------3-----------18--------5------------";

    char *trackB =
    "\033[2;44H"    "-- Track B --"
    "\033[4;24H"    "       ------------5--------18-----------3-------------"
    "\033[5;24H"    "                   /          \\           \\2-----------"
    "\033[6;24H"    "     /------------7------------6---------\\  \\1---------"
    "\033[7;24H"    "    /  /-----------17--------16---------  \\   \\"
    "\033[8;24H"    "   /  /              \\  |  /            \\--15  \\-\\"
    "\033[9;24H"    "  8--/                \\ |/153               \\     -\\"
    "\033[10;24H"   "  |                 154\\|                    |     |"
    "\033[11;24H"   "  |                     |\\156                |     |"
    "\033[12;24H"   " 9--\\               155/|  \\                /    /-/"
    "\033[13;24H"   "   \\  \\              /  |   \\           /--14   /"
    "\033[14;24H"   "    \\  \\-----------10--------13---------  /   /4-------"
    "\033[15;24H"   "     \\----------------------------------11--12---------";

    assert(STR_MAX_LEN > strlen(trackA));
    assert(STR_MAX_LEN > strlen(trackB));

    String s;
    sinit(&s);
    sputstr(&s, VT_CURSOR_SAVE);
    vt_pos(&s, VT_TRACK_GRAPH_ROW, VT_TRACK_GRAPH_COL);
    sputstr(&s, VT_RESET);
    sputstr(&s, track == 'a' ? trackA : trackB);
    sputstr(&s, VT_RESET);
    sputstr(&s, VT_CURSOR_RESTORE);
    PutString(COM2, &s);
}
开发者ID:changshuo,项目名称:cs452,代码行数:44,代码来源:trackserver.c


示例14: main

int main()
{
	PutString("\n-----------------------------------------\n");
	PutString("Lancement du test threadMulJoin : \n");
	PutString("Cree un thread et recupere sa valeur de retour avec Join puis l'affiche.\n");
	PutString("-----------------------------------------\n");
	int tidf;
	int ret;
	tidf = UserThreadCreate(f, 0);
	if(UserThreadJoin(tidf, &ret) == -1)
		PutString("Erreur join du main sur f\n");
	else
	{
		PutString("Code retour f :  ");
		PutInt(ret);
		PutString("\n");
	}
	PutString("Fin du main\n");
    return 0;
}
开发者ID:starfox644,项目名称:jjcgm2014B2,代码行数:20,代码来源:testJoinThreadReturn.c


示例15: main

int main()
{
	PutString("\n-----------------------------------------\n");
	PutString("Lancement du test testJoinThreadFini2 : \n");
	PutString("Lance 2 threads et les attend, le 2e attendu est deja termine.\n");
	PutString("-----------------------------------------\n");
	int tidf, tidg;
	int th_ret;
	tidg = UserThreadCreate(g, 0);
	tidf = UserThreadCreate(f, 0);
	if(UserThreadJoin(tidf, &th_ret) == -1)
		PutString("Erreur join sur f\n");
	if(UserThreadJoin(tidg, &th_ret) == -1)
		PutString("Erreur join sur g\n");
	PutString("Fin du main\n");
    return 0;
}
开发者ID:starfox644,项目名称:jjcgm2014B2,代码行数:17,代码来源:testJoinThreadFini2.c


示例16: main

int main()
{
	PutString("\n-----------------------------------------\n");
	PutString("Lancement du test threadBadArg : \n");
	PutString("Lance un thread avec une mauvaise adresse d'argument.\n");
	PutString("Doit afficher \"Erreur de creation de thread\".\n");
	PutString("-----------------------------------------\n");
	if(UserThreadCreate(f, (void*)-1) == -1)
	{
		PutString("Erreur de creation de thread.\n");
	}
	else
	{
		PutString("Creation reussie.\n");
	}
    return 0;
}
开发者ID:starfox644,项目名称:jjcgm2014B2,代码行数:17,代码来源:threadBadArg.c


示例17: Itoa

char* Itoa(int variable){
	 	 int i,sign;
	 	 char *s = malloc(MAX_LENGTH * sizeof(char));
	 	 if(s == 0){
	 		 PutString("Erreur Malloc\n");
	 		 Exit(0);
	 	 }
	     if ((sign = variable) < 0)
	         variable = -variable;  // on met notre variable positive pour faire notre transformation
	     i = 0;
	     do {  //on crée les variables mais dans l'autre sens
	         s[i++] = variable % 10 + '0';
	     } while ((variable /= 10) > 0);
	     if (sign < 0)
	         s[i++] = '-';
	     s[i] = '\0';
	     s = reverse(s);	//on le remet dans le bon sens
	     return s;
}
开发者ID:starfox644,项目名称:jjcgm2014B2,代码行数:19,代码来源:util.c


示例18: PutString

void CAutomateEmbeddingApp::WriteScriptParameters(PIActionDescriptor descriptor)
   {
   // path for output files
   PutString(descriptor, keyOutput, m_sData->sOutput);
   // system options
   if(m_sData->bJpeg)
      PutBoolean(descriptor, keyJpeg, m_sData->bJpeg);
   // range of embedding strengths
   PutFloat(descriptor, keyStrengthMin, m_sData->dStrengthMin);
   PutFloat(descriptor, keyStrengthMax, m_sData->dStrengthMax);
   PutFloat(descriptor, keyStrengthStep, m_sData->dStrengthStep);
   // range of JPEG compression quality (if requested)
   if(m_sData->bJpeg)
      {
      PutInteger(descriptor, keyJpegMin, m_sData->nJpegMin);
      PutInteger(descriptor, keyJpegMax, m_sData->nJpegMax);
      PutInteger(descriptor, keyJpegStep, m_sData->nJpegStep);
      }
   }
开发者ID:jbresearch,项目名称:simcommsys,代码行数:19,代码来源:AutomateEmbedding.cpp


示例19: main

int
main()
{
	pthread tid;
	UserThreadCreate(f, (void *) THIS, &tid);
	UserThreadCreate(f, (void *) THIS, &tid);
	// UserThreadCreate(f, (void *) THIS, &tid);
	// UserThreadCreate(f, (void *) THIS, &tid);
	// UserThreadCreate(f, (void *) THIS, &tid);
	
	ForkExec("multiplethreads");

	b((void*) THAT);
	b((void*) THAT);
	b((void*) THAT);

	PutString("\nUserPages0 has terminated...\n");
	return 0;
}
开发者ID:eustachy,项目名称:NachOS,代码行数:19,代码来源:userpages0.c


示例20: assert

void TiXmlText::Print( FILE* cfile, int depth ) const
{
	assert( cfile );
	if ( cdata )
	{
		int i;
		fprintf( cfile, "\n" );
		for ( i=0; i<depth; i++ ) {
			fprintf( cfile, "    " );
		}
		fprintf( cfile, "<![CDATA[%s]]>\n", value.c_str() );	// unformatted output
	}
	else
	{
		TIXML_STRING buffer;
		PutString( value, &buffer );
		fprintf( cfile, "%s", buffer.c_str() );
	}
}
开发者ID:jirkadanek,项目名称:bombic2,代码行数:19,代码来源:tinyxml.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ Put_Field函数代码示例发布时间:2022-05-30
下一篇:
C++ PutSeed函数代码示例发布时间: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