I took on a side project for my class in which i need to use C++ and MATLAB to figure out if combinations three items will fir into an intermodal container.
The three items, as referenced, with volumes are:
vol_tube=28.28
vol_liners=9.18
vol_rails=4.0
The volume of the container is referenced as:
carrier_vol= (10*11*16)
My program has to read data (a file with an array of all the different combinations), and determine which combination(s) will fit into the container.
I'm thinking a "while" statement followed by a few "if" statements?
I still kinda suck at programming, and I've been stuck on this for a few hours...
I NEED HELP!!
I can send the .txt file with the data in it if needed...
Well, my advice to you, that you could use an int pointer to read the data - I mean you create an array, like for example "new int = bla-bla[50];" and then use a pointer to move from one slot to another using a loop until the pointer shows the end of the array. during the loop u move pointer like "pointer++" and at each position u check the value if it is good or not.