cherault wrote: |
---|
The compiler has a problem with the declaration of "fichierTcore1", and I don't how how to solve it. |
Your compiler will be giving you a specific error message, describing the problem exactly. Why are you so reluctant to share useful information with us?
If you look at your function, you'll see that you define a parameter called
fichierTcore1 of type
string. However you immediately declare a local variable of exactly the same name of type
ifstream. That's going to cause you confusion, and will probably be the cause of your error.
I'd advise you to give your variables more helpful names generally. In that function, you have
T_CORE1,
tCore1 and
tC1. Clearly, you mean to use those for different things, but nothing about those names indicates what those differences are. That's going to confuse you, and anyone else who looks at your code.
Make your code as self-documenting as possible. It will help keep things clear for you, and for everybody else.
Also, I'll note that the value you pass in for
tC1 get overwritten at line 9, before you ever use it. Or did you mean that to be a value that gets calculated by the function and gets passed back to the calling code.