|
-
March 3rd, 2005, 12:35 PM
#1
Junky CStrings
Hi - do you guys mind helping me again (I really tried my best to figure this out)
I've got the following code:
CString s;
s = " Hello ";
cout << s ; // junk value like 5f4dob14
char * b = "bob";
cout << b; // prints 'bob'
s=b;
cout << s; // new junk value like 002f2191c
I've been looking at my texbook; I can't see what I'm doing differently that would lead to these errors. I've also tried changing the project settings from MFC in a shared dll to MFC in a static library (in both debug and not debug versions) and the junk persists.
(note: for a little while I got some liking errors but I did something (like opening and closing the project) and haven't gotten those errors since. They said something about dlls and symbols not found. Sorry for not having more specific info on that.)
ps: thanks for the explanations about <iostream>. I'm using Visual Studio 6, but I'll stick with the new standards.
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
|