I am using c++
I have a string array and I need to convert it to an int array. I tried static_cast and that did not work. Any suggestions

Recommended Answers

All 2 Replies

you have to use one of the convertion functions. Example:.

char val[] = "123";
int n = atoi(val);
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.