Hey so couldnt find a way to read in a text file to a double array. So I read it in using getline, into a string array. Now I want to convert the string array into a double array, or read in a txt data file with this syntax:
you could use this function. just use the address of the sting (only one number) as first arument. you may set the second argument NULL but if you pass a pointer to a string, it will store all invalid characters there.
this does not check, wether the strimg it reads is actuly a number. a wrong input could crash the whole program. thats why you should read the string into an array or string, check wether its a valid number and then convert it into doubles.