I am fairly new to programming and am trying to error check the user input. I stumbled upon the 'isalpha' etc functions and so my plan is to loop through the array checking everything is a number or (the one) decimal point. However I am using getline for my input which takes in a string and I can't figure out how to convert.
I searched the internet and someone had done a strcpy using pointers to characters but I a) can't get this to work and b) don't understand why pointers are used with the strcpy function I thought it had to be an character array. (On a related point how do you get strcpy, stcmp etc to work with strings?)
Thanks in advance for any help.
P.S Any better ways to error check would be appreciated although I would still be curious to know how to convert strings to an array.