Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / i cant remember

Author
Message
elantzb
16
Years of Service
User Offline
Joined: 10th May 2008
Location: Classified
Posted: 2nd Aug 2008 13:42
how would i do this?



~you can call me lantz~
Master Xilo
18
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bern, Switzerland
Posted: 2nd Aug 2008 15:06
That's correct.

You just have to:

#include <string.h>
using namespace std;


Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 2nd Aug 2008 18:31
Actually, I don't think that would work. strcat would have to be used.

Windows Vista Home Premium Intel Pentium Dual-Core 1.6 Ghz 1GB DDR2 RAM GeForce 8600GT Twin Turbo
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 2nd Aug 2008 19:09
Quote: "Actually, I don't think that would work. strcat would have to be used."


It does work. And strcat won't work with the string class.

I would have more likely done




Variable naming, of course, inappropriate to the situation but it is demonstrative.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 2nd Aug 2008 19:12
Quote: "It does work."


Really?

Great. Now C++ uses that, too. v.v

Windows Vista Home Premium Intel Pentium Dual-Core 1.6 Ghz 1GB DDR2 RAM GeForce 8600GT Twin Turbo
elantzb
16
Years of Service
User Offline
Joined: 10th May 2008
Location: Classified
Posted: 7th Aug 2008 04:10 Edited at: 7th Aug 2008 04:11
thanks

~you can call me lantz~
elantzb
16
Years of Service
User Offline
Joined: 10th May 2008
Location: Classified
Posted: 7th Aug 2008 04:16
how does one output a string to the cmd?



~you can call me lantz~
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 7th Aug 2008 05:12 Edited at: 7th Aug 2008 05:13
myStr.c_str() returns a char* pointer to the string text. Do not use this address to change the string content.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
elantzb
16
Years of Service
User Offline
Joined: 10th May 2008
Location: Classified
Posted: 10th Aug 2008 05:25
sounds like i need to look into string.h

~you can call me lantz~
elantzb
16
Years of Service
User Offline
Joined: 10th May 2008
Location: Classified
Posted: 13th Aug 2008 05:18
this worked for me



~you can call me lantz~

Login to post a reply

Server time is: 2024-09-30 05:28:36
Your offset time is: 2024-09-30 05:28:36