hello,

I'm new here, but I need help...

I want to read a log file file ... but i cant read the output and convert the string to a number (since it contains numbers & letters). Instead, I should read the number, then check (using a for loop) where is the position of the letter 'e', and finally construct the number from the string by multiplying the number before the letter 'e' with 10^(number after letter 'e').

So How could I do THIS ?!

Please, may you post as sample some lines of your log file to be processed? P.S.: Vesta is an ancient Roman goddess not a version of Windows!

Input vector # 99:

OUTPUT: 0 1 0 1 0

**** Vdd = 1.8 **** Tclk = 0.1 ****

SER(FIT): 1.1e-002 1.1e-002 1.9e-002 1.1e-002 5.2e-003**********************************************************

Input vector # 100:

OUTPUT: 0 1 1 0 0

**** Vdd = 1.8 **** Tclk = 0.1 ****

SER(FIT): 7.6e-003 1.3e-002 1.2e-002 1.5e-002 5.2e-003

I want to compute the horizontal sum then the average of the sums USING a simple C++ code

......

Sorry, I apologize to waste your time as I I assumed you need a batch script to process your log. I am not so acquainted with C++ to suggest you the solution; anyway as far as I know about C++ you can read directly numbers expressed in scientific notation as you can by Fortran without a preliminary parsing of each row. Repost your question in the Forum adding the sample in #2 as a thread with answers gets low attention than one with no replies.

Sorry again.

Thank you anyway :)

Ask Your Question

Weekly Poll