t-87740 MSVC++ question [Flat] - TribalWar Forums

MSVC++ question

daerid
10-31-2001, 01:44 PM
Ok, I'm looking for a basic string implementation, that I can use in Visual C++ 6 ( yeah, I'm a newbie )

The documentation states that there's one in <cstring>, but whenever I include that file, it says that the identifier "string" is undefined.

Help plz, tia

RockJura|
10-31-2001, 01:47 PM
CString is pretty much the standard string implementation in that case... Are you trying to copy this for homework? remeber that CString *is* the string object in MSVC++ (at least when working /w windows librarys and headers).

daerid
10-31-2001, 01:54 PM
Sorry, lemme clarify myself a bit here.

Using CString would mean bringing in the MFC libs, and that's something I wanna avoid. It's not for homework, it's for work ;) It's very simple, specific program that deals with a lot of strings. Specifically BSTR's

I could prolly just use BSTR's if somebody could point me to a replace function that I could use with them.

KineticPoet
10-31-2001, 03:13 PM
Yeah, MFC is icky. Check out the STL container classes. There's a good string class, and VC6 ships with all the STL files. You just need to include <string> (as opposed to <string.h>) and declare an std namespace.

You can probably google some STL websites pretty quickly...it's quite widely used. Standard Template Library.
KP

daerid
10-31-2001, 03:31 PM
# include <string>

instead of

# include <string.h>

right?

Now how the hell do I use it?

AgnoStick
10-31-2001, 03:44 PM
******** <string>

using namespace std;

.
.
.

string santa = "hohoho";

daerid
10-31-2001, 03:49 PM
**** ME.

It's in the STD namespace, ****ing forgot that.

:ftard: :weird:

justin
09-05-2003, 06:56 PM
:rofl: @ newbie

AgentOrange
09-05-2003, 07:02 PM
You could also use the ATL/WTL implementation of CString. Free from MFC dependencies, but with the same functionality.

AgentOrange
09-05-2003, 07:03 PM
Or you could browse around high school websites and get the incredibly incredible apstring implementation...

justin
09-05-2003, 07:07 PM
Or you could browse around high school websites and get the incredibly incredible apstring implementation...

apstring is the devil.

apvector too.

daerid
09-05-2003, 07:54 PM
or you guys could realize that this thread is almost
2 ****ING YEARS OLD

DilLw33D
09-05-2003, 08:28 PM
or you guys could realize that this thread is almost
2 ****ING YEARS OLD
:rofl::rofl::rofl:
:rofl::rofl:
:rofl:

Locke355
09-05-2003, 09:05 PM
daerid = ****ing n00b

Gon
09-05-2003, 09:20 PM
fo shizzle

skywalker
09-05-2003, 09:26 PM
or you guys could realize that this thread is almost
2 ****ING YEARS OLD

that just made my ****ing day

AgentOrange
09-05-2003, 11:07 PM
You must have missed our conversation about this thread earlier...

[19:00:31] «@FSB-AO»: post needs a bump..
[19:00:52] «@justin`»: done.

def
09-05-2003, 11:11 PM
that just made my ****ing day
hahahah same