Basic question about string class for C++ .NET

I want to use a string class which does not require any additional DLLs, so that the exe I compile can run on a clean build win95 box simply by copying the exe. Whenever I try to use string, String or CString in C++ it seems to require additional components. When I added mscorlib.dll (.net framework) it was ok. What I need is a string class which does not need .net framework. I also need a registry class and some classes for handling arrays would be nice.

I found a few string classes on the web but who can you trust ?

Main things I need are things like split, join, replace etc etc functionality

Would be nice if my resulting code remained compiler independent but its OK to lock into win32 platforms.

Full points for a solution that gets me bug free string class and a registry class which works without external dlls (kernel, user advapi etc are acceptable)
LVL 4
xassetsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tommy BraasCommented:
I would suggest that you use the standard classes and Standard Template Library classes provided standard with most C++ compiler. A word of warning: any MS C++ compiler does not support the full definition of the C++ language.

For verification purposes, using GCC is a good idea! GCC can be downloaded for free at
   http://www.gnu.org/directory/devel/compilers/gcc.html

It seems to me however that you're linking to the .NET framework, instead of to the crt (c runtime). Have a look at your linker settings in your project, make sure that you're not linking to the .NET runtime.

Arguments above are also true for accessing the registry. I don't think that there is a class abstraction for the registry, however the API calls are easy to follow.
0
_corey_Commented:
You want to use .NET framework without .NET framework installed?
0
SteHCommented:
Be sure to check projects settings to use the non DLL version of the C run time library. At least in VC6 you had the option between single threaded, multi threaded and multi threaded DLL. The last needs then DLLs to be copied with the project, whereas the others don't.
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

xassetsAuthor Commented:
Definitely a beginner to VC, .NET and C++, but on a mission to get 10k lines of vb rewritten to C++ in a few days!

I'm just using the .NET compiler because its already installed. It seems to be similar to VC6 and I can write simple hello world programs which will run on win95 with only copying the exe (no dlls or .net framework). I just need to be able to use string classes etc and hopefully a registry class (apis are fine, wrappers would be nice), and still be able to install on win95 just by copying the exe.

Don't want to use the .net framework - just want an exe that works on its own, don't care if I have to use .net or vc6, they seem similar to me!

Checked the project settings and can't really see anything for C run time library, the MFC setting is "Use Standard Windows Libraries".

0
Tommy BraasCommented:
I would recommend that you have a look at the compiler and linker settings for the simple Hello World sample project and mimic those settings in your own project.
0
xassetsAuthor Commented:
I have been unable to find a hello world sample which uses a string class and does not require a dll. Thats definitely all i need
0
xassetsAuthor Commented:
Question aborted, went the straight C route instead

Thanks to those who contributed
0
DanRollinsCommented:
xassets,
Please finalize this question.  See http:/help.jsp#hs5
-- Dan Rollins, EE C++ area Page Editor
0
PashaModCommented:
Question closed and poitns refunded

PashaMod
CS Moderator
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.