I have an char array i.e
array={2.3,5.5,8.9}
how can I typecast them so I can put them to an array of type double

that is not a character array.

Do you mean like this: char* array[] = {"2.3","5.5","8.9"}; Then just use atof() for each string.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.