|
-
Nov 2nd, 2002, 09:49 AM
#1
Thread Starter
Frenzied Member
totaly new to c++ (not to vb though)
OK im new to C++ and i dont know nothing yet. I wanted to know first how do i make a srting? In vb i go
dim StrString as string
in c++ do i do it like
char MyString = "String Data"
- JayWare
Live to love. Not to Hate
Im to busy to have a site. But I got one and still working on it.
http://dre3k.net/
-
Nov 2nd, 2002, 10:37 AM
#2
transcendental analytic
how about getting started with a tutorial?
http://newdata.box.sk/bx/c/
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 2nd, 2002, 10:45 AM
#3
Thread Starter
Frenzied Member
ive been there and that doesnt really help thanks anyway i got the string thing to work almost.
whats wronge with this?
Code:
char *myString = "Jason Lopez";
SetWindowText(label,*myString);
- JayWare
Live to love. Not to Hate
Im to busy to have a site. But I got one and still working on it.
http://dre3k.net/
-
Nov 2nd, 2002, 10:47 AM
#4
Thread Starter
Frenzied Member
got it
Code:
char *myString = "Jason Lopez";
SetWindowText(label,*myString);
needs to be
char *myString = "Jason Lopez";
SetWindowText(label,myString);
- JayWare
Live to love. Not to Hate
Im to busy to have a site. But I got one and still working on it.
http://dre3k.net/
-
Nov 4th, 2002, 12:37 PM
#5
You'd be better off with console programming...
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Nov 4th, 2002, 02:07 PM
#6
Monday Morning Lunatic
Re: totaly new to c++ (not to vb though)
Originally posted by JasonLpz
OK im new to C++ and i dont know nothing yet. I wanted to know first how do i make a srting? In vb i go
dim StrString as string
in c++ do i do it like
char MyString = "String Data"
In C++, strings are a class:
Code:
#include <iostream>
#include <string>
using namespace std;
int main() {
string s = "Hello";
string x = "World!";
cout << s << ' ' << x << 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
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
|