Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 03-15-2003, 02:01 PM   #16 (permalink)
Travis Dane
Code Monkey
 
Travis Dane's Avatar
 
Join Date: Feb 2003
Location: Netherlands
Posts: 89
Travis Dane is on a distinguished road
Send a message via ICQ to Travis Dane
He could have an old <iostream> library not able to support
strings with cout. Using a variable before it's been defined
produces a "undeclared variable" error not a type conflict.
As i said, Try using abc.c_str() wich turns it into a Character
array instead of a string wich should be compatible with
non-string supporting cout's.
__________________
OpenGL, DirectX
Travis Dane is offline   Reply With Quote
Old 03-15-2003, 02:06 PM   #17 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
1) How is that possible?
He stated in his first post that he is using VC++. So there is nothing wrong with his iostream lib version.

2) What is the use of declaring a string ONLY (and only ) to convert it to a char?
Might as well use a char straight away, you agree on this with me?
Valmont is offline   Reply With Quote
Old 03-15-2003, 02:10 PM   #18 (permalink)
Travis Dane
Code Monkey
 
Travis Dane's Avatar
 
Join Date: Feb 2003
Location: Netherlands
Posts: 89
Travis Dane is on a distinguished road
Send a message via ICQ to Travis Dane
Quote:
1) How is that possible?
He stated in his first post that he is using VC++. So there is nothing wrong with his iostream lib version.
VC++ Doesn't mean VC++6, There are far older version wich
might not support strings.

Quote:
2) What is the use of declaring a string ONLY (and only ) to convert it to a char?Might as well use a char straight away, you agree on this with me?
You're overreacting on the "converting part", You just add .c_str
at the end, That's it. That doesn't stack up with the built in
functions and enhancements that come with the String Class.
__________________
OpenGL, DirectX
Travis Dane is offline   Reply With Quote
Old 03-15-2003, 02:22 PM   #19 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
The iostream library was always up to the standards as defined by ANSI standard in VC++.

The old lib (in pre-VC++ 6) was implemented correctly according the old ANSI standard and the new lib (VC++ 6) according the new ANSI standard.
In both cases, no changes were made to the functionality of "cout" vs strings.

I think mac messed up his libs by accident, and should re-install after completely un-installing LOL

But there is another aspect. Omg lol.
He might use an incompatible iostream lib. For example, using a VC++ 5 iostream in a VC++ 6 environment!

But then again, it still means that his VC++ environment is messed up .
Valmont is offline   Reply With Quote
Old 03-15-2003, 02:53 PM   #20 (permalink)
Travis Dane
Code Monkey
 
Travis Dane's Avatar
 
Join Date: Feb 2003
Location: Netherlands
Posts: 89
Travis Dane is on a distinguished road
Send a message via ICQ to Travis Dane
You keep mentioning VC++ 6, Who says he has that?
Anyway, Let's wait till he tried the things mentioned out.
__________________
OpenGL, DirectX
Travis Dane is offline   Reply With Quote
Old 03-15-2003, 03:04 PM   #21 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
Quote:
Who says he has that?
Not me.

Yes I am mentioning it, but not in a context like as he got it.
Whichever Microsoft version he has, it is interesting to know how the heck he could mess up iostream unless he "fooled around" with that library too.
That is all Trav.

The rest of my posts were scenarios, nothing more .
Valmont is offline   Reply With Quote
Old 03-15-2003, 03:06 PM   #22 (permalink)
Travis Dane
Code Monkey
 
Travis Dane's Avatar
 
Join Date: Feb 2003
Location: Netherlands
Posts: 89
Travis Dane is on a distinguished road
Send a message via ICQ to Travis Dane
Quote:
Originally posted by Valmont
Yes I am mentioning it, but not in a context like as he got it.
Whichever Microsoft version he has, it is interesting to know how the heck he could mess up iostream unless he "fooled
String's weren't always standards (They still are barely in the
majority) so it isn't that suprising that iostream doesn't recognize
the String Class, Not his fault.
__________________
OpenGL, DirectX
Travis Dane is offline   Reply With Quote
Old 03-15-2003, 03:14 PM   #23 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
Wichever Microsoft version he has, it should work. If not, then his environment is messed up, for some reason.
Valmont is offline   Reply With Quote
Old 03-15-2003, 03:17 PM   #24 (permalink)
Travis Dane
Code Monkey
 
Travis Dane's Avatar
 
Join Date: Feb 2003
Location: Netherlands
Posts: 89
Travis Dane is on a distinguished road
Send a message via ICQ to Travis Dane
The oldest VC++ dates back to DOS, String's weren't included
in the ANSI C++ standard, So has no reason for being included
back then, What if he has that one?
Anyway, Let's not jump to conclusion until we know the compiler.
__________________
OpenGL, DirectX
Travis Dane is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help for another program Androto Standard C, C++ 54 10-15-2004 07:21 AM
sorting objects arrays by object properties sde Java 28 08-05-2004 05:51 AM
From C to Java HighterDK Java 11 07-13-2004 07:15 PM


All times are GMT -8. The time now is 01:57 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting