您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetNextChar函数代码示例

51自学网 2021-06-01 21:11:29
  C++
这篇教程C++ GetNextChar函数代码示例写得很实用,希望能帮到您。

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

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

示例1: GetNextChar

//------------------------------------------------------------------------------// Parse a NEXUS-style commentbool Tokeniser::ParseComment (){	bool echo = false;	comment = "";	curChar = GetNextChar ();	echo = (curChar == '!');	if (echo)		curChar =  GetNextChar ();	while ((curChar != '/0') && (curChar != ']'))	{		comment += curChar;		curChar = GetNextChar();	}	if (echo)#if defined __BORLANDC__ && (__BORLANDC__ < 0x0550)		cout << comment;#else		std::cout << comment;#endif	return true;}
开发者ID:bomeara,项目名称:omearatenure,代码行数:27,


示例2: GetNextChar

void CToken::GetTTString(){	int nsLen;	m_eNextTokenType = ttString;	m_sNextTokenType = "String";	nsLen = m_sNextToken.GetLength();	m_sNextToken.Insert(nsLen, m_cNextChar);	GetNextChar();	char cPrevChar='x';	bool bHasRemnString;	do	{		bHasRemnString = false;		while(m_cNextChar != '/"')		{			nsLen = m_sNextToken.GetLength();			m_sNextToken.Insert(nsLen, m_cNextChar);			cPrevChar = m_cNextChar;			GetNextChar();		}		nsLen = m_sNextToken.GetLength();		m_sNextToken.Insert(nsLen, m_cNextChar);		if(cPrevChar == '//')			bHasRemnString = true;		GetNextChar();	}while(bHasRemnString == true);}
开发者ID:asakpke,项目名称:MakeTokenGUI-Compiler-Construction,代码行数:34,


示例3: T

struct Node_t * T(void){  struct Node_t * ret_node;  if (last == '(')  {    last = GetNextChar();    ret_node = E();    last = GetNextChar(); /* preskocit ')' */    return ret_node;  }  free_node->oper = last;  last = GetNextChar(); /* preskocit terminator */  return free_node++;}
开发者ID:jermenkoo,项目名称:spoj.pl_solutions,代码行数:15,


示例4: MHERROR

// Parse a string argument.  ASN1 strings can include nulls as valid characters.void MHParseBinary::ParseString(int endStr, MHOctetString &str){    // TODO: Don't deal with indefinite length at the moment.    if (endStr == INDEFINITE_LENGTH)    {        MHERROR("Indefinite length strings are not implemented");    }    int nLength = endStr - m_p;    unsigned char *stringValue = (unsigned char *)malloc(nLength + 1);    if (stringValue == NULL)    {        MHERROR("Out of memory");    }    unsigned char *p = stringValue;    while (m_p < endStr)    {        *p++ = GetNextChar();    }    str.Copy(MHOctetString((const char *)stringValue, nLength));    free(stringValue);}
开发者ID:DaveDaCoda,项目名称:mythtv,代码行数:26,


示例5: token

/*----------------------------------------------------------------------------------------------------------------------|	Reads rest of parenthetical token (starting '(' already input) up to and including the matching ')' character.  All|	nested parenthetical phrases will be included.*/void NxsToken::GetParentheticalToken()	{	// Set level to 1 initially.  Every ')' encountered reduces	// level by one, so that we know we can stop when level becomes 0.	//	int level = 1;	char ch;	for(;;)		{		ch = GetNextChar();		if (atEOF)			break;		if (ch == ')')			level--;		else if (ch == '(')			level++;		AppendToToken(ch);		if (level == 0)			break;		}	}
开发者ID:rforge,项目名称:phylobase,代码行数:29,


示例6: word

/*----------------------------------------------------------------------------------------------------------------------|	Gets remainder of a quoted NEXUS word (the first single quote character was read in already by GetNextToken). This|	function reads characters until the next single quote is encountered. An exception occurs if two single quotes occur|	one after the other, in which case the function continues to gather characters until an isolated single quote is|	found. The tandem quotes are stored as a single quote character in the token NxsString.*/void NxsToken::GetQuoted()	{	char ch;	for(;;)		{		ch = GetNextChar();		if (atEOF)			break;		if (ch == '/'' && saved == '/'')			{			// Paired single quotes, save as one single quote			//			AppendToToken(ch);			saved = '/0';			}		else if (ch == '/'' && saved == '/0')			{			// Save the single quote to see if it is followed by another			//			saved = '/'';			}		else if (saved == '/'')			{			// Previously read character was single quote but this is something else, save current character so that it will			// be the first character in the next token read			//			saved = ch;			break;			}		else			AppendToToken(ch);		}	}
开发者ID:rforge,项目名称:phylobase,代码行数:41,


示例7: Q3SocketDevice

void MainObject::ProcessCommands(){  char c;  Q3SocketDevice *udp_command=new Q3SocketDevice(Q3SocketDevice::Datagram);  char rml[RD_RML_MAX_LENGTH];  unsigned ptr=0;  bool active=false;  while(!GetNextChar(&c)) {    if(active) {      if(c=='!') {	rml[ptr++]=c;	rml[ptr]=0;	udp_command->writeBlock(rml,ptr,*dest_addr,dest_port);	ptr=0;	active=false;      }      else {	rml[ptr++]=c;      }      if(ptr==RD_RML_MAX_LENGTH) {	fprintf(stderr,"rmlsend: rml command too long/n");	CloseStream();	exit(256);      }    }    else {      if(isalpha(c)) {	rml[ptr++]=c;	active=true;      }    }  }}
开发者ID:WMFO,项目名称:rivendell,代码行数:34,


示例8: IsNextMoveValid

static int IsNextMoveValid(GAME_STATE *ptr, G_GHOST *pGhost){char c;	c = GetNextChar(ptr, pGhost);	return Pac_IsOpenArea(c);}
开发者ID:Alexandre251313,项目名称:pacman,代码行数:7,


示例9: malloc

extern char *GetNextString( read_file *ch_info ) {    char                *buffer;    int                 x = 0;    int                 current_max = BUFF_INC;    int                 ch;    buffer = malloc( BUFF_INC );    do {        if ( x >= current_max ) {            current_max += BUFF_INC;            buffer = realloc( buffer, current_max );            if ( !buffer ) {                puts("Out of memory");                close( ch_info->file_handle );                abort();            }        }        ch = GetNextChar( ch_info );        if ( ch == -1 ) {            puts("File read error occured");            close( ch_info->file_handle );            free( buffer );            abort();        }        buffer[ x ] = ch;        x++;    } while ( ch );    return( buffer );}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:31,


示例10: ListSaveFile

// write the file (or pipe) to another filestatic void _near ListSaveFile( void ){	int i, nFH, nMode;	long lTemp;	POPWINDOWPTR wn;	TCHAR szBuffer[ MAXLISTLINE+1 ];		// disable ^C / ^BREAK handling	HoldSignals();		wn = wOpen( 2, 1, 4, GetScrCols() - 2, nInverse, LIST_SAVE_TITLE, NULL );	wn->nAttrib = nNormal;	wClear();	wWriteListStr( 0, 1, wn, LIST_QUERY_SAVE );	egets( szBuffer, MAXFILENAME, EDIT_DATA | EDIT_BIOS_KEY );		if ( szBuffer[0] ) {				// save start position		lTemp = LFile.lViewPtr;				nMode = _O_BINARY;				if (( nFH = _sopen( szBuffer, ( nMode | _O_WRONLY | _O_CREAT | _O_TRUNC ), _SH_DENYNO, _S_IWRITE | _S_IREAD )) >= 0 ) {						// reset to beginning of file				ListSetCurrent( 0L );						do {								for ( i = 0; ( i < MAXLISTLINE ); i++ ) {										// don't call GetNextChar unless absolutely necessary					if ( LFile.lpCurrent == LFile.lpEOF )						break;					szBuffer[i] = (TCHAR)GetNextChar();				}				szBuffer[i] = _TEXT('/0');							} while (( i > 0 ) && ( wwrite( nFH, szBuffer, i ) > 0 ));						_close( nFH );						// restore start position			LFile.lViewPtr = lTemp;			ListSetCurrent( LFile.lViewPtr );					} else			honk();	}		wRemove( wn );		// enable ^C / ^BREAK handling	EnableSignals();}
开发者ID:CivilPol,项目名称:sdcboot,代码行数:60,


万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。