.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

Reply
 
Thread Tools Display Modes
  #11  
Old April 5th, 2004, 10:06 PM
Cipher7071's Avatar

Cipher7071 Cipher7071 is offline
Second Lieutenant
 
Join Date: Nov 2003
Posts: 482
Thanks: 1
Thanked 0 Times in 0 Posts
Cipher7071 is on a distinguished road
Default Re: Coding Inquiry

I guess I don't quite understand the distinction. Or have I been using too much Pascal?
__________________
The great tragedy of science...the slaying of a beautiful hypothesis by an ugly fact. (T. H. Huxley)
Reply With Quote
  #12  
Old April 5th, 2004, 10:17 PM
Will's Avatar

Will Will is offline
Lieutenant Colonel
 
Join Date: Mar 2001
Location: Emeryville, CA
Posts: 1,412
Thanks: 0
Thanked 0 Times in 0 Posts
Will is on a distinguished road
Default Re: Coding Inquiry

IIRC, chop() is a perl function.

The confusion arises in C/C++ with strings because the name "string" is often used interchangably for the C++ class string, and the "C-style" pointer to an array of characters. And there is quite a bit of difference between an object and a char*

AFAIK, internally, the C++ class string really is just a sort of character array, only with seperate classes for characters to deal with unicode and all that. I remember the first time I saw what "string" actually represents in the debugger, something like three nested templated classes... I was confused for about 10 minutes as to why the function it said was behaving badly was taking that monster as an argument instead of the innocent "string" type I had it taking. But, for most people, as long as you know those functions, you can leave all the nasty bits (such as converting the object to an array of dynamically allocated characters) to the class, and go on your merry way
__________________
GEEK CODE V.3.12: GCS/E d-- s: a-- C++ US+ P+ L++ E--- W+++ N+ !o? K- w-- !O M++ V? PS+ PE Y+ PGP t- 5++ X R !tv-- b+++ DI++ D+ G+ e+++ h !r*-- y?
SE4 CODE: A-- Se+++* GdY $?/++ Fr! C++* Css Sf Ai Au- M+ MpN S Ss- RV Pw- Fq-- Nd Rp+ G- Mm++ Bb@ Tcp- L+
Reply With Quote
  #13  
Old April 6th, 2004, 03:07 AM
Ed Kolis's Avatar

Ed Kolis Ed Kolis is offline
General
 
Join Date: Apr 2001
Location: Cincinnati, Ohio, USA
Posts: 4,547
Thanks: 1
Thanked 7 Times in 5 Posts
Ed Kolis is on a distinguished road
Default Re: Coding Inquiry

Or use C#, where string is a predefined data type
__________________
The Ed draws near! What dost thou deaux?
Reply With Quote
  #14  
Old April 6th, 2004, 04:10 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 Re: Coding Inquiry

c_str() did the trick. Thanks!
__________________
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
  #15  
Old April 6th, 2004, 04:25 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 Re: Coding Inquiry

New question: How do I access files in other directories with file streams?
__________________
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
  #16  
Old April 6th, 2004, 05:39 AM
Atrocities's Avatar

Atrocities Atrocities is offline
Shrapnel Fanatic
 
Join Date: Dec 2000
Location: USA
Posts: 15,630
Thanks: 0
Thanked 30 Times in 18 Posts
Atrocities is on a distinguished road
Default Re: Coding Inquiry

Quote:
Originally posted by Imperator Fyron:
quote:
Originally posted by Atrocities:
If you want to write a program, write one that automatically breaks the files down into easy to follow and PRINTABLE tech trees for use with mods.
That would be rather hard to do... if each tech only had one level, it would be easy. But with lots of levels, it becomes messey... :-\
Well if any one can do it I am sure you can.
__________________
Creator of the Star Trek Mod - AST Mod - 78 Ship Sets - Conquest Mod - Atrocities Star Wars Mod - Galaxy Reborn Mod - and Subterfuge Mod.
Reply With Quote
  #17  
Old April 6th, 2004, 06:08 AM
Will's Avatar

Will Will is offline
Lieutenant Colonel
 
Join Date: Mar 2001
Location: Emeryville, CA
Posts: 1,412
Thanks: 0
Thanked 0 Times in 0 Posts
Will is on a distinguished road
Default Re: Coding Inquiry

Both Windows and Unix use the convention of . for the current directory, and .. for the previous directory. So, you can access directories relatively (eg. "..\..\SEIV\Data\component.txt") or absolutely (eg. "C:\Program Files\Shrapnel\SE4Gold\Data\component.txt").
__________________
GEEK CODE V.3.12: GCS/E d-- s: a-- C++ US+ P+ L++ E--- W+++ N+ !o? K- w-- !O M++ V? PS+ PE Y+ PGP t- 5++ X R !tv-- b+++ DI++ D+ G+ e+++ h !r*-- y?
SE4 CODE: A-- Se+++* GdY $?/++ Fr! C++* Css Sf Ai Au- M+ MpN S Ss- RV Pw- Fq-- Nd Rp+ G- Mm++ Bb@ Tcp- L+
Reply With Quote
Reply

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 01:22 AM.


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