Question: I'm currently working a summer course in programming to learn more while school is on summer break. In one of the assignements, I need to use the given variables to calculate the power of two values. I dont know the values beforehand, as the website generates different values when I try to run the program. I've hit my head against the wall for the whole day so any help nudging me in the right direction is appreciated!! Example of the assignment below.

```
**function laskuFunktio() {
    var luku = noudaArvo("luku");
    var eksp = noudaArvo("eksponentti");

    console.log("Luku " + luku + " potenssiin " + eksp + " on:");
    console.log(laskePotenssi(luku, eksp));
}**

function noudaArvo() { 
    luku = document.getElementById("luku").value        
    eksp = document.getElementById("eksponentti").value;
    return ???
}

function laskePotenssi() {
    if (eksp === 0) {
        tulos = 1;
    }
    var tulos = Math.pow(luku, eksp);
    return tulos 
}

```

The first function is predetermined so I cant edit it, but the assignments are made possible without editing it or accessing the HTML files. The return statement was just edited by me to sho where I currently am stuck. Thanks for any help once more!

Answer: 
Current folder and folder-of-exe-file are different things (sometimes). Try to specify full name of file (with disk, all folders, etc.).

You can check errors of file open operation by calling

```
if (!DataFile) { ... }

```
You can get an error code (and get a description of error in internet) if you use C-function `fopen`. If open is failed, you get the nullptr as result of fopen and `errno` will contain code of error.