Question

I need to write a C++ program where I need to read in a file and...

I need to write a C++ program where I need to read in a file and do somethings with information inside the file. We can NOT use arrays.

The picture below is what is in the file. My question is how do I read in the file and return the number of studies ( the 5 in the file ) so I can pass it through an other funciton. we need to use ofstream commands.

I need to write a C++ program where I need to read

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
I need to write a C++ program where I need to read in a file and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Write a C++ program that will read a large .txt file and will find the highest...

    Write a C++ program that will read a large .txt file and will find the highest and lowest voltage, along with the associated time and ampere. The text file is large 1,000,000 rows of data, so speed is a factor. Per some of my own research it may be best to use mmap (If I have the fastest program I will receive a significant amount of extra credit)? Someone also told me that binary can be fast, but I have...

  • I am writing a program in C++, which requires me to read an input text file...

    I am writing a program in C++, which requires me to read an input text file using command line argument. However, I am using xcode on my Macbook to write C++ program, and use terminal instead of command. How do you use int main(int argc, char** argv[]) to read an input file. My professor requires us not to hard code the text file name like .open("example.txt"); Thank you!

  • IN C++ Write a program in c++ that will read from a file the following sentence:...

    IN C++ Write a program in c++ that will read from a file the following sentence: The quick brown fox jumps over the lazy dog Each word must be read into one location in an array beginning with the first element. You must declare an array as follows: char *words [9] ; // this is an array of c- strings. HINT words[0] will contain "the" words[1] will contain "quick" write a function int length (const char *a) to determine the...

  • Arrays and reading from a file USE C++ to write a program that will read a...

    Arrays and reading from a file USE C++ to write a program that will read a file containing floating point numbers, store the numbers into an array, count how many numbers were in the file, then output the numbers in reverse order. The program should only use one array and that array should not be changed after the numbers have been read. You should assume that the file does not contain more than 100 floating point numbers. The file name...

  • in c++ please HW09: Read/Write File Ints Now that we've had a taste of what file...

    in c++ please HW09: Read/Write File Ints Now that we've had a taste of what file I/O is all about, here's your chance to try it out on your own! You're to write a program that will prompt the user if he/she would like to read ints from a file (and have them displayed to stdout) or write ints to a file for safekeeping. If the user wishes to save a set of numbers, then the file nums.txt is opened...

  • //I NEED THE PROGRAM IN C LANGUAGE!// QUESTION: I need you to write a program which...

    //I NEED THE PROGRAM IN C LANGUAGE!// QUESTION: I need you to write a program which manipulates text from an input file using the string library. Your program will accept command line arguments for the input and output file names as well as a list of blacklisted words. There are two major features in this programming: 1. Given an input file with text and a list of words, find and replace every use of these blacklisted words with the string...

  • Write a program in C++ that will read a sentence from the keyboard, terminated with a...

    Write a program in C++ that will read a sentence from the keyboard, terminated with a period '.' and write the sentence to an output file with all white spaces replaced by the symbol '*'. You may use the “isspace()” function of the “cctype” library to carry out the determination of whether the character read is 'white space'. Show any #include files you may need. Make sure to handle conditions where the file may be missing so your program does...

  • I need help solving this C++ problem please. A data file will be provided that contains...

    I need help solving this C++ problem please. A data file will be provided that contains the first names and student IDs for a class. Write a program that stores this information using parallel arrays in C++. Assume that the data file will be named "students.txt" and will contain information with no more than 100 students. You can also assume that none of the first names will contain any spaces. The program will need to contain four functions: Read data...

  • Write a program to read the contents of data.txt file, and determine the smallest value (min),...

    Write a program to read the contents of data.txt file, and determine the smallest value (min), largest value (max), and the average value (ave). The minimum, maximum, and average values must be calculated in the function calc(). Remember to declare the stdlib.h library, so that you can use the atof function, which will convert the number in the text file into float number. Also, remember to check if there is an error opening the file or not. If there is...

  • I was wondering if I could get some help on the last program I need to...

    I was wondering if I could get some help on the last program I need to complete for an engineering C++ class. It is a very simple program however there is one part of the problem stumping me. Here is the problem statement . Write a C++ program that reads in from a file two month names, followed by the rainfall amounts for each month in that span of months. These rain amounts are totaled, and then an average for...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT