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


C++ deleteList函数代码示例

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


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

示例1: while

double *getNewValues(double *x, int n, list *blocks, double *y)
{
    int i=0, j;
    list *node = blocks;
    while(i<n)
    {
        if(node != NULL && checkBoundires(node, i))
        {
            for(j=i;j<=node->blockEndIndex;j++)
                y[j] = node->avg;
            
            i = node->blockEndIndex+1;
            node = node->next;
        }
        else
        {
            y[i] = x[i];
            i++;
        }
    }
    
    
    deleteList(blocks);
    
    return y;
}
开发者ID:Nullification,项目名称:FastIsoReg,代码行数:26,代码来源:isoreg.c

示例2: deleteList

 static void deleteList(ListNode * l)
 {
     if(! l -> next)
         delete l;
     deleteList(l -> next);
     delete l;
 }
开发者ID:afeinland,项目名称:fuzzy-octo-archer,代码行数:7,代码来源:LinkedString.hpp

示例3: main

int main() {
    linknode *flist,*rlist,*find;
    int index; char value;
    rlist=(linknode*)malloc(sizeof(linknode));
    rlist->next=NULL;
    printf("plase input a sting,end with the KEY_Enter \n");
    //flist=CreateListF();
    //printLinkList(flist);
    CreateListR(rlist);
    printLinkList(rlist);
    printf("list length=%d \n",getLength(rlist));
    printf("set insert node:index,value:");
    scanf("%d,%c",&index,&value);
    printf("insert a element!");
    insertList(rlist,value,index);
    printLinkList(rlist);
    printf("list length=%d \n",getLength(rlist));
    printf("set delete node index:");
    scanf("%d",&index);
    deleteList(rlist,index);
    printf("delete a element!");
    printLinkList(rlist);
    printf("list length=%d \n",getLength(rlist));
    printf("set visit node index:");
    scanf("%d",&index);
    find=getNode(rlist,index);
    if(find!=NULL)
    {
        printf("this node value=%c \n",find->data);
    }
    
    return 0;
}
开发者ID:lsr90518,项目名称:LinkNodeByC,代码行数:33,代码来源:LinkNode.c

示例4: IODTFindMatchingEntries

void AppleMacIO::publishBelow( IORegistryEntry * root )
{
    OSCollectionIterator *	kids;
    IORegistryEntry *		next;
    IOService *			nub;

    // infanticide
    kids = IODTFindMatchingEntries( root, kIODTRecursive, deleteList() );
    if( kids) {
	while( (next = (IORegistryEntry *)kids->getNextObject())) {
	    next->detachAll( gIODTPlane);
	}
	kids->release();
    }

    // publish everything below, minus excludeList
    kids = IODTFindMatchingEntries( root, kIODTRecursive | kIODTExclusive,
					excludeList());
    if( kids) {
	while( (next = (IORegistryEntry *)kids->getNextObject())) {

            if( 0 == (nub = createNub( next )))
                continue;

            nub->attach( this );
	    
	    processNub(nub);
	    
            nub->registerService();
        }
	kids->release();
    }
}
开发者ID:OpenDarwin-CVS,项目名称:SEDarwin,代码行数:33,代码来源:AppleMacIO.cpp

示例5: find_specific

//
// tries to make an exit parse var
PARSE_VAR *use_one_parse_token_exit(CHAR_DATA *looker, PARSE_TOKEN *tok, 
				    const char *name) {
  int    type = FOUND_NONE;
  void *found = find_specific(looker, name, "", "", FIND_TYPE_EXIT, tok->scope,
			      tok->all_ok, &type);

  // make sure we found something
  if(found == NULL)
    return NULL;
  else {
    PARSE_VAR *var = newParseVar(PARSE_VAR_EXIT);

    // if multiple vals were possible, flag it
    var->multiple_possible = tok->all_ok;

    // Is it a single exit?
    if(type == FOUND_EXIT)
      var->ptr_val = found;

    // or is it multiple exits?
    else if(type == FOUND_LIST) {
      if(listSize(found) > 1) {
	var->ptr_val = found;
	var->multiple = TRUE;
      }
      else if(listSize(found) == 1) {
	var->ptr_val = listPop(found);
	deleteList(found);
      }
      else {
	deleteList(found);
	deleteParseVar(var);
	var = NULL;
      }
    }

    // We should never reach this case
    else {
      deleteParseVar(var);
      var = NULL;
    }

    // return whatever we found
    return var;
  }
}
开发者ID:KaSt,项目名称:nereamud,代码行数:48,代码来源:parse.c

示例6: deleteList

/***********************************************************************
     * ExchangeWindow
     * init

***********************************************************************/
void fired::ExchangeWindow::init(fired::MapObjectCollector *collector) {
	deleteList(exchange);
	sf::Vector2f winOffset = win->offset;

	for (int i = 0; i < 10; i++)
		for (int j = 0; j < 5; j++)
			exchange.push_back(new fired::InventoryWindowItem(winOffset + sf::Vector2f(380.0f + 35.0f * i, 185.0f + 35.0f * j), &collector->items[i][j], itAny));
}
开发者ID:MORTAL2000,项目名称:fired,代码行数:13,代码来源:win_exchange.cpp

示例7: deleteList

// This destructor destroys a list and frees the associated nodes.
void deleteList(List l)
{
    if (l == 0)
		return;
    List rest = l->nextPtr;
	free(l);
	deleteList(rest);
};
开发者ID:Danghor,项目名称:Algorithms,代码行数:9,代码来源:minsort.c

示例8: deleteList

void deleteList(struct xTEDSQualifierListNode* p)
{
	if(p==NULL) return;
	deleteList(p->next);
	if(p->data!=NULL)
		delete(p->data);
	free(p);
}
开发者ID:NKSG,项目名称:vn-sdm,代码行数:8,代码来源:xTEDSQualifierList.cpp

示例9: deleteList

void deleteList(Node *head)
{
	if(!head)
		return ;

	deleteList(head->next) ;
	free(head) ;
}
开发者ID:GautamSingh2100,项目名称:LinkedList,代码行数:8,代码来源:MergesortOverLinkedList.cpp

示例10: _tmain

int _tmain(int argc, _TCHAR* argv[])
{
	printf("0 - exit\n");
    printf("1 - add value to sorted list\n");
    printf("2 - remove value from list\n");
    printf("3 - print list\n");

	IntList *head = newList(-1);

	while(true)
	{
		printf("Input command:\n");
		int command = 0;
		scanf("%d", &command);
		int val = 0;
		switch (command)
		{
			case 0:
				deleteList(head);
				return 0;
			case 1:
				printf("Input value:\n");
				
				scanf("%d", &val);
				addToSortedList(head, val);
				break;
			case 2:
				printf("Input value:\n");
				
				scanf("%d", &val);
				removeValue(head, val);
				break;
			case 3:
				printList(head);
				break;
		};

	}
	
	deleteList(head);

	scanf("%*s");
	return 0;
}
开发者ID:MrKuznetsov,项目名称:hw-cpp,代码行数:44,代码来源:Task3.cpp

示例11: main

int main()
{
    constexpr unsigned N = 5;
    list listx = nullptr;

    createCircularList(listx,N);
    printList(listx);
    deleteList(listx);
    return 0;
}
开发者ID:franciscomunoz,项目名称:Sedgewick-algorithms-in-C-14--exercises-and-examples,代码行数:10,代码来源:ex_3.27.cpp

示例12: deleteList

/* deletes list */
void deleteList(element head,int is_nodes,int recursivly){
	if(head==NULL){
		return;
	}
	deleteList(head->next,is_nodes,recursivly);
	if (recursivly==1){
		remove_tree(head->node,0,recursivly);
	}
	free(head);
}
开发者ID:guydaich,项目名称:SoftProjGames,代码行数:11,代码来源:minimax.c

示例13: destroyHashTable

void destroyHashTable(hash_t *hashTable) {
   // Free all of the lists
   for (int i = 0; i < hashTable->capacity; i++) {
        if (hashTable->buckets[i] != NULL) {
            deleteList(hashTable->buckets[i]);
        }
   }
   free(hashTable->buckets);
   free(hashTable);
}
开发者ID:zopppo,项目名称:cornedBeef,代码行数:10,代码来源:hash.c

示例14: deleteScriptGenerator

/// Function name  : deleteScriptGenerator
// Description     : Destroys a ScriptGenerator
// 
// SCRIPT_GENERATOR*  &ScriptGenerator   : [in] ScriptGenerator to destroy
// 
VOID  deleteScriptGenerator(SCRIPT_GENERATOR*  &pGenerator)
{
   // Delete Arguments/Variables list
   deleteList(pGenerator->pVariablesList);

   // Delete XML Tree
   if (pGenerator->pXMLTree)
      deleteXMLTree(pGenerator->pXMLTree);

   // Zero Layout
   utilZeroObject(&pGenerator->oLayout, XML_SCRIPT_LAYOUT);

   // Delete INPUT and OUTPUT
   deleteList(pGenerator->pInputList);
   deleteCommandStream(pGenerator->pOutputStream);
   
   // Delete Generator
   utilDeleteObject(pGenerator);
}
开发者ID:nick-crowley,项目名称:X-Studio,代码行数:24,代码来源:Script+Conversion.cpp

示例15: deleteList

List& List::operator =(
		const List& other) {

	if (this != &other) {
		deleteList();
		copyList(other);
	}

	return *this;
}
开发者ID:smurfolan,项目名称:SDP-PCODE-REVIEW,代码行数:10,代码来源:List.cpp


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