![]() |
|
#11
|
||||
|
||||
|
Quote:
Yes I agree with you there. I retracted and apologized a few posts back then, realizing the posed problem was beyond my scope of knowledge, stepped aside and waited to hear what the knowledgeable people had to say. Oh, and I am using gcc 3.3.3 cygwin special and bash 2.04b. As far as std and cout not being related I guess it is just my compiler that complained about a void main and cout being undeclared until I include iostream and add using namespace std; But hey, I'm just a new guy that didn't read the original post closely enough. Quote:
I think this is for dsmith and WaltP. I believe they were PM'ing the possible solutions (so as not to spoil the surprise) to the problem. I do agree with your signature. Unfortunately I still both try and fail on a regular basis. Thanks for your time. __________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work." --Thomas Alva Edison "Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety." --Benjamin Franklin "A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes." --Hugh Downs |
||||
|
#12
|
|||
|
|||
|
Quote:
I'm not sure why you say this. The following will not compile with Visual C++ Version 12.00.8804 (Part of my installation of VC++ 6) CPP / C++ / C Code:
It needs either "using namespace std;" or "using std::cout;" or "std::cout" in place of cout. (Also won't compile with gcc or borland bcc32.) If you #include the deprecated <iostream.h> instead of <iostream>, it compiles and executes OK with any of these compilers, but "deprecated" means that it might not be supported in future versions of the language. Regards, Dave |
|
#13
|
|||
|
|||
|
Quote:
What do we do if think we've solved it? You told us later to PM (which I'm assuming is personal message) it to you, but it says I don't have the right privilege to do so. You also mentioned that we shouldn't post it here as to not spoil anything. Uhh... so, what do I do? |
|
#14
|
||||
|
||||
|
Quote:
Ahhhh! Post more. I can't remember how many posts you have to have for PM priviliges. Or if you have I/M you could post it or allow me to contact you by email. If none of those work, I will post an email address that you can send it to, that i will delete once you have seen it. ![]() __________________
The best damn Sports Blog period. |
|
#15
|
||||
|
||||
|
Quote:
Indeed, I was talking about the "deprecated" version of the header. And yes, it is not supported in the future versions (that's why I thought he was using .NET ). However, if we go one or two compilers back, we won't be able to compile the "improved" version Quote:
Oh, but I was NOT aiming for apologizes; I was just saying that it was not necessarily a mistake. It was just something added to your response, which on some compilers was appropiate; I apreciated your post, as it was helpfull to people who used for example .NET and tried to compile that piece of code. Actually, if this was understood as a reproach, it is I who must apologize. Kind regards, Luci __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#16
|
|||
|
|||
|
Quote:
Of course the program (with void main() and with <iostream> but without the std namespace being referenced) will not compile at all with any compiler compliant with the C++ standard. I am sure that you, Luci, know this, but people new to C++ read these messages all of the time without knowing what the heck we are talking about. In particular lots of tutorials and even some current books still have examples that use void main() and they use cout, cin, endl, etc., without any reference to namespaces. New people wonder why programs like this don't compile, and/or give messages like 'cout undeclared'. In general, "old" c++ compilers didn't require any namespace qualifications, since the original release of c++ didn't place any emphasis on namespaces. Nowadays, things like cout and other thingies from <iostream> are part of the std namespace, and programs must specify that somehow (perhaps using one of the three methods that i suggested previously). Use of <iostream.h> is still allowed, for now, for compatibility with old stuff, and <iostream.h> "conveniently" wraps up cout, etc. into the std namespace without requiring any designation of the namespace. Sometimes beginners are given the advice to use <iostream.h> instead of being enlightened as how to use std namespace correctly. I say, "let the sun shine in." Just my .02 euros. Regards, Dave |
|
#17
|
||||
|
||||
|
I completely agree.
Quote:
Loved this. Wonder what Darrin has to say about it Regards, Luci __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#18
|
||||
|
||||
|
Quote:
Darrin is confused! Why would I have anything to say about that?__________________
The best damn Sports Blog period. |
|
#19
|
||||
|
||||
|
Quote:
Hm... Well, I thought it was a little joke reffering to the way you sometimes end your posts: Quote:
I guess this saying is that ordinary in the US that I'm the only one who cracks up about it? Oh well, it's probably just my european humour Kind regards, Luci __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#20
|
|||
|
|||
|
Quote:
Well, I used to offer my "two cents worth" from time to time, but with the current exhange rate, I'll go for euros. Dave (Left Coast, USA) |
Recent GIDBlog
Toyota - 2009 May Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| help with coding expectation maximization needed. thanks | edge | C Programming Language | 8 | 08-Nov-2005 06:00 |
| Some small things | Allowee | GIDSearch™ | 6 | 14-Jul-2004 02:40 |
| This is a small snippet from a much larger piece. | Tang_Quester | Open Discussion Forum | 1 | 19-Mar-2004 02:17 |
| Free 1st month / Free setup / No credit card needed...Plans start at 4.95 | LarryIsaac | Web Hosting Advertisements & Offers | 0 | 11-Oct-2003 15:03 |
| Script needed for letting user input a few days of data for tracking and analysis. | tradertt | MySQL / PHP Forum | 3 | 06-Mar-2003 03:54 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The