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


C++ PutString函数代码示例

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


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


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