Read data from a file individually and multiply the two columns in C++

后端 未结 2 1906
天涯浪人
天涯浪人 2021-01-17 06:10

I have a data file \"1.dat\" which has 4 columns and 250 rows.

I need to read each row and process it such as to multiply two columns [col1 and col2].

Can yo

2条回答
  •  感情败类
    2021-01-17 06:20

    http://www.cplusplus.com/doc/tutorial/files/ Here's a few tips on how to read a file using C++, after that you're going to need to cast a string into an integer or float depending.

提交回复
热议问题