Hey. Thank you so much, you've been very helpful. That wan instantaneous fix.
The Matrix works fine. But Still don't know how to deal with CMD arguments (Error handling Section) and Finding the largest product. It's like I know what to do but I don't know how to express it. Basically what I'm trying to say is that I went over all the posts you sent me. Tried to do functions on my own. But it is intimidating
Can you please help me with those two functions. This homework assignment is due tomorrow and I'm overwhelmed.
You already have a function that creates an array. You just need to modify it to return the array, so that main can use the array whenever main needs to call other functions. Earlier I suggested doing something like making a function that can print the array. I shall give you an example here. Give me about an hour to get it ready, because I am about to eat dinner.
I have pasted something I did several years ago in an introductory class that shows how to read an array in one function and then print it in another.
The same technique can be used in your program, but with an added function that can find the largest product of adjacent entries in an array. http://pastebin.com/xi1reeyd
int main(int argc, char * argv)
//check to see that argc is correct
//if it is not correct, print error and return 0
//if it is correct then you would need to check each string from argv
//argv is the name of the command typed
//argv is the first argument
//argv is the second argument
//argv is the third argument... etc.
So if you were to type: int kappa = atoi(argv);
That would take the second argument and convert it to an integer and store it to a variable called kappa.
Hey thank you. but I have a hard time writing the conditions (for the commented lines) I know what to print out but how do I use if else statements? I mean how do i write the conditions in C++. that is the major problem I have. Not knowing how to write. I'm really sorry for all this trouble.
I've got an exam tomorrow and also this is due tomorrow. Can you write the actual code for me?
Maybe you could check out the tutorial. I suggest paying closer attention in lecture and reading all the assigned reading in the course. Read extra if you have to until you understand it. There are several C++ tutorials on the Internet. http://www.cplusplus.com/doc/tutorial/
If I was to simply write the code for you I would be depriving you of learning this.
Summer classes are fast paced. Welcome to university level. I highly recommend reading more of the course material or tutorials before typing any more programs. I wish you luck on your exam tomorrow. Try to get a good night sleep. Maybe your professor will be generous enough to accept a late submission? I recommend visiting either the professor or one of the TAs as soon as you have trouble on the next assignment. When you have no code at all and are completely lost, they have the ability to sit with you in person and explain things really well. This forum on the other hand is for help with any problems that can be stated as specific questions. Anyway, I do wish you luck in your studies.
it is not about creating the array. Array works fine. I need help with linking finding_greatest_production function to create_array function. greatest product function is supposed to find the largest product of any four adjacent numbers in the array. That's what I need help with.