So I am writing this program to generate HTML files from a Components.txt file (have to do something during a quarter with no computer science classes
), and I have run into a problem. I can not seem to find any way to get ofstreams to accept strings as their filename, only arrays of characters. This sucks, as I can't make an array of characters with a dynamic size. I want to have separate HTML files for each General Group. Everything is working great except for the naming issue. Any group with a space generates gobbley-gook character arrays, even when I have a special case for spaces being turned into underscores. Also, it inserts a bunch of what I can only assume are null characters at the _beginning_ of the char array, rather than the end... :-\ Since I plan on releasing this open-sourced anyways, please take a look at the current freeze of the
source code. The offending code starts with this line (can't get the line number, as on a crappy Dell comp atm...):
code:
while (generalGroupVector.size() > 0)