Write a C++ program to read 20 numbers from user and place them in a one dimensional array. The program should?
-
Write a C++ program to read 20 numbers from user and place them in a one dimensional array. The program should then read from the array and calculate the maximum value the minimum ...show more
-
Answer:
Well, unless you can count on the user to format the entire path of the file correctly in C++ eyes, you will need to parse the path information from the entered data before feeding it to the file open statement. For example, your program and the file aren't in the same directory, the directory they are in isn't the current directory at the time, or the user enters 'C:\SomeDirectory\OtherDirectory\Sensor3... For example, for C++ to think this is valid, the slashes must be replaced with the escape string for a slash, '\\' . You always need to check and parse these characters in strings that will ultimately be passed down into the OS layer for execution. And, no, C / C++ won't automatically convert them to the proper form and neither will the OS in most cases like this. I hope that this will help you get it running. Good luck!
UNONL6D5H5GNTBSY7IJMJNDXU4 at Yahoo! Answers Visit the source
Related Q & A:
- How to write a parser in C?Best solution by Stack Overflow
- How to write a program to monitor the temperature of CPU?Best solution by Stack Overflow
- How Can I use .net dll in C program?Best solution by Stack Overflow
- How to run an executable from within a c program?Best solution by Stack Overflow
- How to write a TV program proposal?
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.