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

C++ showList函数代码示例

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

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



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

示例1: isPalindrome

bool isPalindrome(ListNode* head) 
{
  if (! head)
    return true;

  int len = ::lenList(head);
  if (len == 1)
    return true;

  ListNode* mid1 = head;
  for (int i=0; i<len/2-1; ++i)
    mid1 = mid1->next;
  ListNode* mid2 = mid1->next;

  ListNode* left = head;
  ListNode* right = mid2;
  mid1->next = NULL;
  if (len % 2)
  {
    right = right->next;
    mid2->next = NULL;
  }
  showList(left);
  showList(right);
  right = reverseList(right);
  showList(right);
  while (left && right)
  {
    if (left->val != right->val)
      return false;
    left = left->next;
    right = right->next;
  }
  return true;
}
开发者ID:taiyang-li,项目名称:leetcode-src,代码行数:35,代码来源:234.cpp


示例2: main

int main() {
	Node* list = NULL;
	list = addElement(list, 6);
	list = addElement(list, 6);
	list = addElement(list, 6);
	list = addElement(list, 6);
	list = addElement(list, 6);
	list = addElement(list, 6);
	list = addElement(list, 5);
	showList(list);
	list = removeElements(list, 6);
	showList(list);
	return 0;
}
开发者ID:waynewae,项目名称:-LeetCode-C-Remove-Linked-List-Elements,代码行数:14,代码来源:Remove+Linked+List+Elements.c


示例3: prearrangeList

void LLLocationInputCtrl::onTextEntry(LLLineEditor* line_editor)
{
	KEY key = gKeyboard->currentKey();
	MASK mask = gKeyboard->currentMask(TRUE);

	// Typing? (moving cursor should not affect showing the list)
	bool typing = mask != MASK_CONTROL && key != KEY_LEFT && key != KEY_RIGHT && key != KEY_HOME && key != KEY_END;
	bool pasting = mask == MASK_CONTROL && key == 'V';

	if (line_editor->getText().empty())
	{
		prearrangeList(); // resets filter
		hideList();
	}
	else if (typing || pasting)
	{
		prearrangeList(line_editor->getText());
		if (mList->getItemCount() != 0)
		{
			showList();
			focusTextEntry();
		}
		else
		{
			// Hide the list if it's empty.
			hideList();
		}
	}
	
	LLComboBox::onTextEntry(line_editor);
}
开发者ID:gabeharms,项目名称:firestorm,代码行数:31,代码来源:lllocationinputctrl.cpp


示例4: performSearch

void QgsLocatorWidget::triggerSearchAndShowList()
{
  if ( mProxyModel->rowCount() == 0 )
    performSearch();
  else
    showList();
}
开发者ID:CS-SI,项目名称:QGIS,代码行数:7,代码来源:qgslocatorwidget.cpp


示例5: QMenu

MainWindow::MainWindow()
{
    QMenu *fileMenu = new QMenu(tr("&File"));

    fileMenu->addAction(tr("E&xit"), this, SLOT(close()),
        QKeySequence(tr("Ctrl+Q", "File|Exit")));

    QMenu *actionsMenu = new QMenu(tr("&Actions"));
    actionsMenu->addAction(tr("&Highlight List Items"),
                        this, SLOT(highlightListItems()));
    actionsMenu->addAction(tr("&Show Current List"), this, SLOT(showList()));

    QMenu *insertMenu = new QMenu(tr("&Insert"));

    insertMenu->addAction(tr("&List"), this, SLOT(insertList()),
        QKeySequence(tr("Ctrl+L", "Insert|List")));

    menuBar()->addMenu(fileMenu);
    menuBar()->addMenu(insertMenu);
    menuBar()->addMenu(actionsMenu);

    editor = new QTextEdit(this);
    document = new QTextDocument(this);
    editor->setDocument(document);

    setCentralWidget(editor);
    setWindowTitle(tr("Text Document List Items"));
}
开发者ID:cedrus,项目名称:qt4,代码行数:28,代码来源:mainwindow.cpp


示例6: menu

int menu()
{
    int option;
    char flag = 'y';

    do
    {
        printf( "\n-- MENU --\n1 - INSERIR item no FIM da lista"
               "\n2 - INSERIR item em POSICAO especifica"
               "\n3 - REMOVER item por POSICAO"
               "\n4 - REMOVER item por VALOR"
               "\n5 - MOSTRAR lista"
               "\n6 - Encerrar o programa"
               "\n\nDigite a sua opcao : " );
        scanf( "%u", &option );
        switch( option )
        {
            case 1: insertItemEndList();    break;
            case 2: insertItem();           break;
            case 3: deleteItemPosition();   break;
            case 4: deleteItemValue();      break;
            case 5: showList();             break;
            case 6: flag = 'n';             break;
        }
    }
    while( flag == 'y' );

    return 0;
}
开发者ID:engCmpUfg,项目名称:Estrutura-de-Dados-1,代码行数:29,代码来源:ex15_ListEst.c


示例7: while

void MainWindow::initData()
{
    std::ifstream monFichier;
    std::string extension = "./sauve.txt";
    std::vector<std::string> myLine;
    std::string title, autor, editor, style, resume, actor;
    int piste, editorYear;

    monFichier.open(extension.c_str());
    lib.clear();

    if(monFichier)
    {
        while(monFichier)
        {
            std::string ligne;
            getline(monFichier, ligne);
            myLine = split(ligne, "//");
            if (myLine[0] == "<Book>")
            {
                title = myLine[1];
                autor = myLine[2];
                resume = myLine[3];
                editor = myLine[4];
                editorYear = atoi(myLine[5].c_str());
                Book* book = new Book(title, autor, resume, editorYear, editor);
                lib.push_back(book);
                myLine.clear();
            }
            else if (myLine[0] == "<CD>")
            {
                title = myLine[1];
                autor = myLine[2];
                style = myLine[3];
                piste = atoi(myLine[4].c_str());
                CD* cd = new CD(title, autor, style, piste);
                lib.push_back(cd);
                myLine.clear();
            }
            else if (myLine[0] == "<Movie>")
            {
                title = myLine[1];
                autor = myLine[2];
                resume = myLine[3];
                style = myLine[4];
                actor = myLine[5];
                Movie* movie = new Movie(title, autor, resume, style, actor);
                lib.push_back(movie);
                myLine.clear();
            }
        }
    }
    else
    {
        std::cout<<"ERREUR: Impossible d'ouvrir le fichier "<<extension<<std::endl;
    }
    monFichier.close();

    showList();
}
开发者ID:oOSeleneOo,项目名称:PTOO_Graph,代码行数:60,代码来源:mainwindow.cpp


示例8: main

int main(){
    
    while(1){    
        printf("1)createList 2)showList 3)insertNode 4)deleteNode\n");
        scanf("%d", &input);
        switch(input){
            case 1:
                createList();
                break;
            case 2:
                showList();
                break;
            case 3:
                int insertData[2]={0,0};
                *insertData = insertRequest();
                node* iNode;
                iNode = (node*)malloc(sizeof(node));
                iNode->name = insertData[0];
                insertNode(iNode,insertData[1]);

                break;
            case 4:
                break;
            case 5:
                printf("離開程式!\n");
                return 0;
            default:
                break;

        }
    }
}
开发者ID:yale918,项目名称:yale918.github.io,代码行数:32,代码来源:linkedListUI.c


示例9: sortList

void ProcList::showCallers(const Database::Symbol *symbol)
{
	list = database->getCallers(symbol);

	sortList();
	showList(0);
}
开发者ID:CyberShadow,项目名称:verysleepy-1,代码行数:7,代码来源:proclist.cpp


示例10: main

void main()
{
	cout<<"请输入有向图的节点,以-1,-1结束:"<<endl;
	int i,j;
	while(true)
	{
		cin>>i>>j;
		if(i==-1 && j==-1) break;
		if(i<0  || j<0)
		{
			cout<<"输入错误"<<endl;
			exit(1);
		}
		arc[i][j] = 1;
		cout<<endl;
	}
	cout<<"节点数(1~"<<MAX_NODE<<"):"<<endl;
	cin>>n;
	if(n<1 || n>MAX_NODE)
	{
		cout<<"错误,节点数必须是在1到"<<MAX_NODE<<"之间的数"<<endl;
		exit(1);
	}

	cout<<"输出邻接矩阵如下:"<<endl;
	showMGraph();

	//进行拓扑排序
	while(true)
	{
		//假设所有剩余的节点都没有入度
		bool flag = true;

		for(int i=0; i<n; i++)
		{
			//如果是已被移除或者存在入度的节点
			if((arc[i][i] == -1) || hasInRoad(i)) continue;

			//发现了一个入度,假设不成立
			flag = false;

			//该节点没有入度
			list[index++] = i;
			removeNode(i);

			//所有节点都已经排序
			if(index>=n)
			{
				showList();
				return;
			}
		}
		if(flag)
		{
			cout<<"该有向图含有环."<<endl;
			exit(2);
		}
	}
}
开发者ID:cqiyi,项目名称:kaoshi,代码行数:59,代码来源:test02.cpp


示例11: fillSearchList

void ImportNative::searchName()
{
    QString s;

    fillSearchList("name");

    s = m_chanName_text->GetText();
    showList(tr("Select a channel name"), s, SLOT(gotName(QString)));
}
开发者ID:mojie126,项目名称:mythtv,代码行数:9,代码来源:importnative.cpp


示例12: showList

void LLGestureComboList::draw()
{
	LLUICtrl::draw();

	if(mButton->getToggleState())
	{
		showList();
	}
}
开发者ID:OS-Development,项目名称:VW.Kirsten,代码行数:9,代码来源:llnearbychatbar.cpp


示例13: doc

void MainWindow::on_btn_addDoc_clicked()
{
    addDocument doc(&lib,this);
    doc.exec();
    if(doc.close())
    {
        showList();
    }
}
开发者ID:oOSeleneOo,项目名称:PTOO_Graph,代码行数:9,代码来源:mainwindow.cpp


示例14: showList

	void ComboBox::notifyButtonPressed(WidgetPtr _sender, int _left, int _top, MouseButton _id)
	{
		if (MouseButton::Left != _id) return;

		mDropMouse = true;

		if (mListShow) hideList();
		else showList();
	}
开发者ID:venkatarajasekhar,项目名称:viper,代码行数:9,代码来源:MyGUI_ComboBox.cpp


示例15: setColor

void Combobox::mouseClick(int _y)
{
	if (printed == 0)
		return;
	setColor(FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
	setPosition(7, 6);
	cout << "You chose: " << options[row];
	showList();
}
开发者ID:DanielAdler23,项目名称:Software-Methods,代码行数:9,代码来源:Combobox.cpp


示例16: displayTable

void displayTable(struct linknode **hashTable)
{
	int i;
	for(i=0; i < TABLESIZE; i++)
	{
		printf("%d: ", i);
		showList(hashTable[i]);
		printf("\n");
	}
}
开发者ID:sagar13,项目名称:temp,代码行数:10,代码来源:hash.c


示例17: main

int main()
{
	pNode list1,list2;
	initList(&list1);
	initList(&list2);
	printf("Please input %d numbers to create list:\n",N);
	int i,elem;
	for(i=0;i<N;++i)
	{
		scanf("%d",&elem);
		insertList(&list1,elem);
	}

	showList("Before split",list1);
	fun(&list1,&list2);
	showList("After split,List1",list1);
	showList("After split,List2",list2);
	return 0;
}
开发者ID:ShiboBrady,项目名称:linux,代码行数:19,代码来源:main.c


示例18: main

int
main(int, char *[])
{
     static_assert(ShowInstance<Test>(), "Show instance error");
     static_assert(!ShowInstance<int>(), "Show internal error");

     std::cout << show(Test{}) << std::endl;
     std::cout << showList(std::list<Test>{}) << std::endl;

     return 0;
}
开发者ID:italiancpp,项目名称:meetup-milano-2014,代码行数:11,代码来源:typeclass-example.cpp


示例19: main

int main(int argc, char *argv[]) {
    
    List l = newList();
    FILE *f = fopen("collection.txt", "r");
    getCollection(l, f);
    showList(l);
    
    getGraph(l, ListLength(l));
    
    return 0;
}
开发者ID:vivianlikeyeah,项目名称:Ashesh-3,代码行数:11,代码来源:main.c


示例20: showList

BOOL LLLocationInputCtrl::handleKeyHere(KEY key, MASK mask)
{
	BOOL result = LLComboBox::handleKeyHere(key, mask);

	if (key == KEY_DOWN && hasFocus() && mList->getItemCount() != 0 && !mList->getVisible())
	{
		showList();
	}

	return result;
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:11,代码来源:lllocationinputctrl.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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