Jun 6th, 2001, 07:15 PM
#1
Thread Starter
Hyperactive Member
Strings
Anyone knows a good tutorials for strings? Also, a tutorials to make owner-draw menus? Thanks in advance
Amon Ra
The Power of Learning.
Jun 6th, 2001, 09:29 PM
#2
Frenzied Member
Here is an example on owner drawn control and menus (it is MFC and the comments are not in English).
Attached Files
Jun 7th, 2001, 03:28 AM
#3
Monday Morning Lunatic
So that's basically useless to a real programmer j/k
For strings, you don't really need a tutorial:
Code:
#include <iostream>
#include <string>
using namespace std;
void main() {
string x = "Hello";
string y = x + " ggg " + x.substr(2,2);
cout << y << endl;
}
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Jun 7th, 2001, 09:35 PM
#4
Thread Starter
Hyperactive Member
ohhh...
I guess <string> is different from <string.h>, cuz when i tried string.h, there were a lot of weird stuff... btw, what is the last part of the string y=... line for? with the 2.2?
Amon Ra
The Power of Learning.
Jun 7th, 2001, 09:39 PM
#5
Monday Morning Lunatic
string::substr(start, length)
Basically it's Mid$
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Jun 8th, 2001, 12:09 AM
#6
Thread Starter
Hyperactive Member
Parksie....
What is the :
Code:
using namespace std;
for??
Amon Ra
The Power of Learning.
Jun 8th, 2001, 06:59 AM
#7
Monday Morning Lunatic
To prevent name collisions, everything in the STL is in a namespace called "std". So, if you already have a list class, it won't kill it.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width