Hi, i need to make a very large char array (char array[10000000]). How would I do this without getting a stack overflow error?

You can try taking in a vector char array. That way enough Memory will be allocated depending upon the input .. So you will not need to make such a huge array.

allocate it dynamically from the heap, which is usually much larger

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.