.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old April 5th, 2004, 06:52 AM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Coding Inquiry

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) 

__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
 

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 10:40 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.