I would like to have an array that is pretty huge along with being able to hold atleast a sentence in each value.

I want to be able to check if a string exists inside it (hopefully fast :P).

Why? I want a program to read through a tab seperated file and then place the results inside of an ini file. (key=value). The file is 50,000 or so lines large, and there are many duplicates so I would like to eliminate all of the duplicates.

I am not extremely experienced in C, but I should be able to understand it if you explain it a little bit :P.

-- I am using Visual Studio 2008 (VC++ 2008)

(I have googled it, but A. It doesn't work with VC++ B. It doesn't work.)


Thanks for your time,
-- fmwyso

Don't use an array. A std::set or std::map seems much better suited to your problem.

Hey, I wasn't really able to locate many useful tutorials for sets. Are there any that anybody knows of?

-- Thanks for the comment, read up about set and it looks great for this.. Thanks :P. (If you think map would be useful tell me, but set looks great so far :P).

Go to google.com. Search using the words: using STL set. I liked the sgi site but there are others to peruse as well.

My bad xD, I searched google for set C++ etc. Finally, i just checked the mdsn site. Thanks for your help, If a gm can close this... That'd be great :D.

>If a gm can close this... That'd be great
We don't close threads when they're solved, but it's possible to flag a thread as solved to notify readers that you got your answer.

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.