Dec 3, 2006 #1 F fatma1000 Banned Joined Apr 30, 2006 Messages 147 Helped 3 Reputation 6 Reaction score 2 Trophy points 1,298 Location eygpt Activity points 0 hi all how can i get the maximum of array? please get the code in c++ thanks
Dec 4, 2006 #2 N newelltech Full Member level 4 Joined Aug 23, 2006 Messages 214 Helped 34 Reputation 68 Reaction score 2 Trophy points 1,298 Activity points 2,929 Re: help1 C++ int ar[] = {1,2,3,4}; int num_elements =sizeof(ar); int num_bytes = num_elements/sizeof(int);
Re: help1 C++ int ar[] = {1,2,3,4}; int num_elements =sizeof(ar); int num_bytes = num_elements/sizeof(int);
Dec 4, 2006 #3 E echo47 Advanced Member level 6 Joined Apr 7, 2002 Messages 3,933 Helped 638 Reputation 1,274 Reaction score 90 Trophy points 1,328 Location USA Activity points 33,176 help1 C++ A quick Google search find this ... http://www.fredosaurus.com/notes-cpp/algorithms/other/array-max.html
help1 C++ A quick Google search find this ... http://www.fredosaurus.com/notes-cpp/algorithms/other/array-max.html
Apr 11, 2007 #4 S shabab Member level 3 Joined Apr 3, 2007 Messages 57 Helped 3 Reputation 6 Reaction score 0 Trophy points 1,286 Activity points 1,537 help1 C++ you can either call sizeof() function or calculate manually by while loop reaching end starting from 0 index
help1 C++ you can either call sizeof() function or calculate manually by while loop reaching end starting from 0 index