This may not be a problem if you’re manually running this program once from the command line. Every time the program is run, the program will wait for the user to enter input. However, there is a potential problem with this approach. To do this, you might take this approach: // Program: Thumbnail How would Thumbnail know which image to read and process? The user has to have some way of telling the program which file to open. For example, let’s say you were writing a program called Thumbnail that read in an image file, and then produced a thumbnail (a smaller version of the image). However, many programs need some kind of input to work with. Notice that this version of main() takes no parameters. Up to this point, we’ve declared main like this: int main() When a program is run, execution starts at the top of the function called main(). As you learned lesson 0.4 - introduction to development, when you compile and link your program, the output is an executable file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |