Re: Articles of War -No. 62-
Art. 62. If upon marches, guards, or in quarters different corps shall happen to join, or do duty together, the officer highest in rank, according to the commission by which he is mustered in the Army, Navy, Marine Corps, or militia, there on duty by orders from competent authority, *-shall command the whole-* and give orders for what is needful for the service, unless otherwise directed by the President of the Confederate States in orders of special assignment providing for the case.
(my emphasis)