Sooner or later, you will come across boost http://www.boost.org/ - if you choose to use it, here is a viable option: |
Dang kfmfe04, that code looks soooo good but could you post an example with-out the use of boost.
Thanks meesa, but it be months before we even see code like that. I will be looking into all of this the rest of the night. Boost and namespace custom going to be a good head-start.
I didn't want to mention it but actually this is my first programming class ever, C/C++, and I don't want to use what the instructor may not be using. I been hacking with this for over 24 hours with no luck, and after many days of reading, it's not even in the textbook what-so-ever or Chapter-3. Could be a typo in the assignment or the instructor would simply like to know how-to himself. Nine out of ten his true field is law. heehee
I use to write some great assembler for Windows in masm and fasm and for me, I assure you, moving to C++ is as difficult as moving from c++ to assembler. I need to see the code. I will understand it as I tamper with it just as I did with asm. With-in a few months I'll be benchmarking everything I see and write.
I found this code below to be interesting but my Microsoft Visual Studio 8.0 can't find this mscorlib.dll. See what I mean. Even the instructor might not have it. Any ideas about this. He grade all project by "Start without debugging" Also do you know anything about this mscorlib.dll
Thanks for the reply
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#using <mscorlib.dll>
using namespace System;
using namespace System::Collections;
int main()
{
String* delimStr = S" ,.:";
Char delimiter[] = delimStr->ToCharArray();
String* words = S"one two,three:four.";
String* split[] = 0;
Console::WriteLine(S"The delimiters are -{0}-", delimStr);
for (int x = 1; x <= 5; x++) {
split = words->Split(delimiter, x);
Console::WriteLine(S"\ncount = {0, 2} ..............", __box(x));
IEnumerator* myEnum = split->GetEnumerator();
while (myEnum->MoveNext()) {
String* s = __try_cast<String*>(myEnum->Current);
Console::WriteLine(S"-{0}-", s);
}
}
}
| |