I need to list the files in my current directory and have them packed into an array of chars, in Linux.
I use system("ls > temp_file"); to write them one per row in a temp file, and then I copy from this file to my string.
Is there a more concise way out there?

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.