CPP08 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
main.cpp ファイル

Tests and verifies the behaviour of the easyfind template function. [詳解]

#include "easyfind.hpp"
#include <iostream>
#include <list>
#include <vector>
main.cpp の依存先関係図:

[ソースコード]

関数

template<typename T >
void printContainer (const T &container, const std::string &name)
 Helper function to display container elements to standard output.
 
int main ()
 Program entry point.
 

詳解

Tests and verifies the behaviour of the easyfind template function.

This program tests the easyfind function for the following two container types.

  1. std::vector
  2. std::list

For each container, two scenarios are tested: when the specified element is found, and when it is not found and NotFoundException is thrown.

main.cpp に定義があります。

関数詳解

◆ main()

int main ( )

Program entry point.

Executes the test case for the easyfind function.

戻り値
Returns 0 when normal termination occurs.

main.cpp49 行目に定義があります。

◆ printContainer()

template<typename T >
void printContainer ( const T &  container,
const std::string name 
)

Helper function to display container elements to standard output.

テンプレート引数
TContainer type.
引数
containerContainer to display.
nameContainer name (for display).

main.cpp36 行目に定義があります。