c++ - Missing template argument before start -


I am trying to compare the time taken to populate the vector against the linked list

  # include & lt; Iostream & gt; # Include & lt; Sstream & gt; # Include & lt; List & gt; #include & lt; Vector & gt; # Include & lt; Ctime & gt; # Include & lt; Time.h> using namespace std; Int main () {List & lt; Int & gt; My list; Of vector & lt; Int & gt; Myvector; Srand (time (zero)); Int num; Clock_t list_start; Watch_list list_end; Start list = clock (); For (Int i = 0; I <10000000; i ++) // 1 billion times {num = rand ()% 1000000000; Mylist.push_back (number); } List end = clock (); Cout & lt; & Lt; Difftime (LIST_START, LIST_END); Cout & lt; & Lt; "The list is complete"; Clock_t vector_start; Clock_t vector_end; For (Int i = 0; I <10000000; i ++) // 1 billion times {num = rand ()% 1000000000; Myvector.push_back (number); } Cout & lt; & Lt; Difftime (vector_start, vector_end); Cout & lt; & Lt; "Vector is done"; }   

I get the following error

Before the missing template logic starts; Be expected ;

How do I correct these errors?

change

  start list = clock ();   

to

  list & lt; Int & gt; Start = clock ();   

This will fix an error, but perhaps you wanted to write

  list_start = clock ();   

Thanks for @ Reset Ninja

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -