Undepricated gcc Hello World?
I tried to write the most basic hello world program I know of in c++ and I am getting deprication messages from gcc when I compile. Looking through the the documentation I have on line has merely lead to several levels of indirection. What am I supposed to use insted of <iostream.h>? And where do I find documentation on this which won't take me an hour to figure out how to use basic standard in and standard out? STH
On Friday 28 March 2003 15:13, Steven T. Hatton wrote:
I tried to write the most basic hello world program I know of in c++ and I am getting deprication messages from gcc when I compile. Looking through the the documentation I have on line has merely lead to several levels of indirection. What am I supposed to use insted of <iostream.h>? And where do I find documentation on this which won't take me an hour to figure out how to use basic standard in and standard out?
Show us the code! My guess is you are actually using <iostream.h> instead of <iostream>. For me, compiling: #include <iostream> int main( int argc, char *argv[] ) { std::cout << "derek" << "\n"; return 0; } with: g++ -o iostream iostream.cpp works fine. -- "...our desktop is falling behind stability-wise and feature wise to KDE ...when I went to Mexico in December to the facility where we launched gnome, they had all switched to KDE3." - Miguel de Icaza, March 2003
On Friday 28 March 2003 02:39 am, Derek Fountain wrote:
Show us the code! My guess is you are actually using <iostream.h> instead of <iostream>. For me, compiling:
#include <iostream>
int main( int argc, char *argv[] ) { std::cout << "derek" << "\n"; return 0; }
with:
g++ -o iostream iostream.cpp
works fine.
No need. The code is almost identical you yours. The Part I didn't know to do whas "std::". And the "endl" seems to be a thing of the past as well. Thanks for the help. This should give you an idea of how long it's been since I worked with C++. STH
* Steven T. Hatton <hattons@globalsymmetry.com> [Mar 28. 2003 10:27]:
No need. The code is almost identical you yours. The Part I didn't know to do whas "std::". And the "endl" seems to be a thing of the past as well.
std::endl still works fine. You gcc have just become more anal with the namespaces. -- Mads Martin Joergensen, http://mmj.dk "Why make things difficult, when it is possible to make them cryptic and totally illogical, with just a little bit more effort?" -- A. P. J.
On Friday 28 March 2003 04:31 am, Mads Martin Jorgensen wrote:
* Steven T. Hatton <hattons@globalsymmetry.com> [Mar 28. 2003 10:27]:
No need. The code is almost identical you yours. The Part I didn't know to do whas "std::". And the "endl" seems to be a thing of the past as well.
std::endl still works fine. You gcc have just become more anal with the namespaces.
-- Mads Martin Joergensen, http://mmj.dk
I'm still confused about documentation. What documentation covers the standard C++ libraries in gcc? STH
I'm still confused about documentation. What documentation covers the standard C++ libraries in gcc?
How about: http://gcc.gnu.org/onlinedocs/libstdc++/documentation.html ? Of course, whether they help or just confuse you even more is a question only you can answer. For STL stuff I have the SGI docs bookmarked: http://www.sgi.com/tech/stl/ although gcc uses the HP implementation. It's all the same (bugs excluded). Even then I tend to go and look in the header files for what I'm after, just because it's quicker to grep than do a web search. -- "...our desktop is falling behind stability-wise and feature wise to KDE ...when I went to Mexico in December to the facility where we launched gnome, they had all switched to KDE3." - Miguel de Icaza, March 2003
On Friday 28 March 2003 05:42 am, Derek Fountain wrote:
I'm still confused about documentation. What documentation covers the standard C++ libraries in gcc?
How about:
http://gcc.gnu.org/onlinedocs/libstdc++/documentation.html
?
Of course, whether they help or just confuse you even more is a question only you can answer. For STL stuff I have the SGI docs bookmarked:
although gcc uses the HP implementation. It's all the same (bugs excluded). Even then I tend to go and look in the header files for what I'm after, just because it's quicker to grep than do a web search.
They seem extraordinarily incomplete. I'm trying to figure out things that should be simple, such as how to work with the string class. How do I create a string type variable within a class, and assign a value to it? STH
They seem extraordinarily incomplete.
That's often the nature of free software documentation, I'm afraid. :o( The SGI stuff is OK, though.
I'm trying to figure out things that should be simple, such as how to work with the string class.
Consider using a toolkit of some sort. The C++ standard library is horrible to work with and should be avoided where possible[*]. The best toolkit on the market at the moment is Qt[*], which isn't just a GUI toolkit, it gives data structures, strings, XML handling and all sorts of other stuff. Extremely well put together, excellent documentation and hundreds of examples. If you're doing GPL software, consider using Qt. [* My opinion, others will differ.]
How do I create a string type variable within a class, and assign a value to it?
Does this help show the way?: #include <string> #include <iostream> int main( int argc, char *argv[] ) { std::string s; s = "derek"; std::cout << s << "\n"; return 0; } -- "...our desktop is falling behind stability-wise and feature wise to KDE ...when I went to Mexico in December to the facility where we launched gnome, they had all switched to KDE3." - Miguel de Icaza, March 2003
On Friday 28 March 2003 07:34 am, Derek Fountain wrote:
They seem extraordinarily incomplete.
That's often the nature of free software documentation, I'm afraid. :o( The SGI stuff is OK, though.
$ locate string.h | grep gcc /opt/gcc-3.2/include/c++/3.2/bits/basic_string.h $ less /opt/gcc-3.2/include/c++/3.2/bits/basic_string.h // Components for manipulating sequences of characters -*- C++ -*- ... // ISO C++ 14882: 21 Strings library ... // Documentation? What's that? // Nathan Myers <ncm@cantrip.org>. // ... So, is this the file that answers to <string>?
I'm trying to figure out things that should be simple, such as how to work with the string class.
Consider using a toolkit of some sort. The C++ standard library is horrible to work with and should be avoided where possible[*]. The best toolkit on the market at the moment is Qt[*], which isn't just a GUI toolkit, it gives data structures, strings, XML handling and all sorts of other stuff. Extremely well put together, excellent documentation and hundreds of examples. If you're doing GPL software, consider using Qt.
[* My opinion, others will differ.]
Oh, certainly. QT's fantastic, and wonderfully documented.
How do I create a string type variable within a class, and assign a value to it?
Does this help show the way?:
#include <string> #include <iostream>
int main( int argc, char *argv[] ) { std::string s;
s = "derek";
std::cout << s << "\n"; return 0; }
The following accomplishes the basic goal, but leaves several questions unanswered: #include <iostream> // cout, cin #include <string> using namespace std; // Thanks Tom Bradley. class HelloClass { public: void sayHello(); void setMessage(char * message="Hello C++ World"); private: string str; }; void HelloClass::setMessage(char * message){ str = message; } void HelloClass::sayHello() { cout << str << endl; } main() { HelloClass h; h.setMessage(); h.sayHello(); return 0; } How would I set HelloClass::str to something within the class definion, or constructor? IOW, how do I initialize member variables of user defined types to default values? STH
How would I set HelloClass::str to something within the class definion, or constructor? IOW, how do I initialize member variables of user defined types to default values?
Just write your constructor like this: HelloClass::HelloClass() { str = "Default string"; } Or do I misunderstand the question? -- "...our desktop is falling behind stability-wise and feature wise to KDE ...when I went to Mexico in December to the facility where we launched gnome, they had all switched to KDE3." - Miguel de Icaza, March 2003
On Sunday 30 March 2003 09:54 am, Derek Fountain wrote:
How would I set HelloClass::str to something within the class definion, or constructor? IOW, how do I initialize member variables of user defined types to default values?
Just write your constructor like this:
HelloClass::HelloClass() { str = "Default string"; }
Or do I misunderstand the question?
OK, now that I have the name space stuff straightened out, that works for me. I was trying things with /new/ and mixing in the namespace resolution syntax, which wasn't working. At this point, I don't even want to think about why. I also got a compile error when I left out the explicit declaration of the constructor, but that was immediately obvious. The next thing I need to figure out is the difference between class HelloClass { ... private: string str; } and class HelloClass { ... private: string * str; } I know one is a pointer, and the other is simply a class member of type /string/. I just need to figure out how the two differ in behavior. I've discovered places where I was able to declare pointers in classes, but not members of the type referred to by the pointer. I'm pretty sure it has to do with how the constructors of the member types behave, I'm just not sure what exactly is causing the problems. If I can't figure it out, I'll see if I can formulate a good example to demonstrate the problem. This is, IMO, the kind of Hello World that should be a standard example for working with the string class, perhaps with a good example of a pointer to a string being used as well: #include <iostream> // cout, cin #include <string> using namespace std; class HelloClass { public: HelloClass::HelloClass(); void sayHello(); void setMessage(char * message="Hello C++ World. Default setMessage."); private: string str; }; void HelloClass::setMessage(char * message){ str = message; } void HelloClass::sayHello() { cout << str << endl; } HelloClass::HelloClass(){ str = "Hello C++ World. Declared in constructor."; } main() { HelloClass h; h.sayHello(); h.setMessage(); h.sayHello(); h.setMessage("User defined \"Hello World\" message."); h.sayHello(); return 0; }
-- "...our desktop is falling behind stability-wise and feature wise to KDE ...when I went to Mexico in December to the facility where we launched gnome, they had all switched to KDE3." - Miguel de Icaza, March 2003
HelloClass::HelloClass(string& istring) { str = istring; } HelloClass::HelloClass() { str = "default string"; } You can set up multiple constructors as above (this is not the best way to do it). Then to print the string, you may want to create a friend function so that you can do something like: HelloClass hw("Hello, World!"); cout << hw << endl; This should be in one of your books. Let the constructor assign the the string. That does not eliminate the desire for setting a message, but you can also use some overloading such that: hw = "New Value"; For the HelloClass, using a pointer is probably not altogether useful. But, you also need to be aware of some subtle performance issues. But, at this stage, try to concentrate on setting up constructors with optional arguments and default values. Without complexity, look at setting up things like copy constructors: HelloClass::HelloClass(HelloClass &s) { str = s.str; } Assignment operator, and possibly concatenation. You wil be reinventing the wheel a bit, but you will also be learning. Don't worry too much about efficiency. Once you are experienced in the language, then you can be more efficient. In any kind of computer programming, the most important issue is to accomplish the task at hand. But, I always try to make my code readable and maintainable. One reason is that I have had to maintain some horrible code (eg. the sources for YACC and LEX). The other reason is that I want those who come behind me not to curse me. In this industry there are always cases where when looking for a job, someone who knows you may be on the hiring side. But even for your own personal code, you might put it down and not look at it for a while.
On Sunday 30 March 2003 04:57 pm, Jerry Feldman wrote: ...
Then to print the string, you may want to create a friend function so that you can do something like:
HelloClass hw("Hello, World!");
cout << hw << endl; This should be in one of your books.
This looks a lot like the MyClass.toString() of Java. I'm not sure I have the best books for learning C++. The Ellis and Stroustrup book seems to be about 50% apology for doing things Stroustrup would rather not have, but for the desire to cooperate with existing C program(mer)s. It's interesting, but certainly doesn't present the language as deftly as K&R does C. K&R is one very well written book. I have Horstmann's 1991 edition. It's probably dated. Pohl's book is likewise a decade old. I'm sure they are all worth reading, but they probably don't provide the best treatment of recent advances, and imporved libraries, etc. They will have to do for now, however.
Let the constructor assign the the string. That does not eliminate the desire for setting a message, but you can also use some overloading such that: hw = "New Value";
For the HelloClass, using a pointer is probably not altogether useful. But, you also need to be aware of some subtle performance issues. But, at this stage, try to concentrate on setting up constructors with optional arguments and default values. Without complexity, look at setting up things like copy constructors: HelloClass::HelloClass(HelloClass &s) { str = s.str; }
Assignment operator, and possibly concatenation. You wil be reinventing the wheel a bit, but you will also be learning. Don't worry too much about efficiency. Once you are experienced in the language, then you can be more efficient.
In any kind of computer programming, the most important issue is to accomplish the task at hand. But, I always try to make my code readable and maintainable. One reason is that I have had to maintain some horrible code (eg. the sources for YACC and LEX). The other reason is that I want those who come behind me not to curse me. In this industry there are always cases where when looking for a job, someone who knows you may be on the hiring side. But even for your own personal code, you might put it down and not look at it for a while.
I place readability very high on my list of priorities. Good structure is also very important. I've wasted a good deal of time debugging problems that arose because I tried to cut corners. Basically I believe in always writing code 'correctly', hense the question about undepricated Hello World. I could have simply turned off the deprication message and continued to march. I also belive in finding a reasonably good solution to a generic problem, and applying it consistently rather than inventing different 'creative solutions' to the same problem. C++ seems to be rife with opportunities to hang yourself with the available rope. One concern I have is to learn 'safe' coding in C++. I know there are all kinds of pitfalls that Java simply doesn't allow you to get near. Most of these have to do with pointers and memory management. I took a look at http://lxr.mozilla.org/seamonkey/source/security/nss/cmd/certcgi/certcgi.c and found myself amazed, horrified, amused and baffled. STH
On Mon, 31 Mar 2003 06:17:16 -0500 "Steven T. Hatton" <hattons@globalsymmetry.com> wrote:
On Sunday 30 March 2003 04:57 pm, Jerry Feldman wrote: ...
Then to print the string, you may want to create a friend function so that you can do something like:
HelloClass hw("Hello, World!");
cout << hw << endl; This should be in one of your books.
This looks a lot like the MyClass.toString() of Java. The way you do it is to define a friend function. friend ostream &operator<<(ostream &os, HelloClass &hw) { os << hw.str; return os; }
Now you can output as above.
C++ seems to be rife with opportunities to hang yourself with the available rope. One concern I have is to learn 'safe' coding in C++. I know there are all kinds of pitfalls that Java simply doesn't allow you to get near. Most of these have to do with pointers and memory management Java is an excellent language whose objectives were to some extent to remove some of the problem areas in C (and C++): dynamic memory allocation and deallocation is something Java does with garbage collections. In C and C++, integral data types are not defined as a fixed size: short must be at least 16 bits but may be larger. int may be as small as 16 bits or larger. (The int data type was intended to be the most efficient integral such that it was the register size. On a 64 bit machine it should be 64 bits, but when Digital came out with the Alpha, they decided that so much code assumes as 32 bit int, that they kept int as 32 bits). longs may be 32 bits or larger.
On typical 64 bit machines, such as Tru64 Unix, Linux on the Alpha chip, longs and pointers are 64 bit. In Java, the language defines the size of these variables such that a long is 64 bits (period). Remember that the C language was designed as an OS implementation language, not as a business application language. Java was originally developed as an embedded language. C++ was designed to support OO. As you lament, Bjarne does not agree with some of the direction the language has taken. However, C++ is extremely powerful. You need to understand things like multiple inheritance, templates, overloading, and a few other elements. C++ also has a large body of class libraries, such as the STL. WRT: Safe coding. You need to have a basic understanding of C, pointers, and automatic variables. Also, there are many products in C++ like JBuilder. I suggest you first learn C++, then use code generators or other tools that hide the details from you. -- -- Gerald Feldman <gfeldman@attbi.com> Boston Computer Solutions and Consulting ICQ#156300 PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
Steven T. Hatton wrote:
This looks a lot like the MyClass.toString() of Java. I'm not sure I have the best books for learning C++. The Ellis and Stroustrup book seems to be about 50% apology for doing things Stroustrup would rather not have, but for the desire to cooperate with existing C program(mer)s. It's interesting, but certainly doesn't present the language as deftly as K&R does C. K&R is one very well written book. I have Horstmann's 1991 edition. It's probably dated. Pohl's book is likewise a decade old. I'm sure they are all worth reading, but they probably don't provide the best treatment of recent advances, and imporved libraries, etc. They will have to do for now, however.
You might try something like Deitel & Deitel given that you're newer to C++ but already know java. Stroustrup's C++ book is good but a little harder. Ellis and Stroustrup is older, very definitive and very difficult to read. I use it only when I need to know how something really obscure works. -- JDL
On Mon, 31 Mar 2003 17:37:27 +0100 John Lamb <J.D.Lamb@btinternet.com> wrote:
You might try something like Deitel & Deitel given that you're newer to C++ but already know java. Stroustrup's C++ book is good but a little harder. Ellis and Stroustrup is older, very definitive and very
difficult to read. I use it only when I need to know how something really obscure Excellent book. I briefly had Harvey Deitel when I was working on my CS Master's.
-- -- Gerald Feldman <gfeldman@attbi.com> Boston Computer Solutions and Consulting ICQ#156300 PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
I know one is a pointer, and the other is simply a class member of type /string/. I just need to figure out how the two differ in behavior. I've discovered places where I was able to declare pointers in classes, but not members of the type referred to by the pointer. I'm pretty sure it has to do with how the constructors of the member types behave, I'm just not sure what exactly is causing the problems. If I can't figure it out, I'll see if I can formulate a good example to demonstrate the problem.
As you say one is a pointer, and one is a class. The pointer holds an address in memory. It takes 4 bytes (probably, depending on architecture, etc.) and just holds a single number. End of story. The class member is a complete class instance held in memory, taking as much space as the class takes. Potentially that could be many bytes - or even many megabytes. They both work in the same way, only with the pointer you have to dereference it before you can utilise the class instance it points to. That is, you have to add the syntax which says "work with the object this pointer points to, not the pointer itself". Dereferencing is normally done with the -> operator for individual class members, or the * operator for the entire object. When creating a pointer, the compiler doesn't need to know the entire definition of the object. So you can say: class MyClass; class SomeOtherClass { ... private: MyClass* pointer; 'pointer' will just be 4 bytes and the compiler will note the class it's pointing to, but at this stage it doesn't need to know the details of MyClass - just being told there is a class called that is enough. When, elsewhere in the code, 'pointer' is dereferenced, the code at that point will need to know the full definition of MyClass. This might explain your "I can create a pointer but not an object" puzzle. If you want the object, you need to ensure the compiler can see the full definition of the class you're instantiating. You probably need to #include the appropriate header file. -- "...our desktop is falling behind stability-wise and feature wise to KDE ...when I went to Mexico in December to the facility where we launched gnome, they had all switched to KDE3." - Miguel de Icaza, March 2003
On Fri, 28 Mar 2003 04:26:51 -0500 "Steven T. Hatton" <hattons@globalsymmetry.com> wrote:
On Friday 28 March 2003 02:39 am, Derek Fountain wrote:
Show us the code! My guess is you are actually using <iostream.h> instead of <iostream>. For me, compiling:
#include <iostream>
int main( int argc, char *argv[] ) { std::cout << "derek" << "\n"; return 0; }
with:
g++ -o iostream iostream.cpp
works fine.
No need. The code is almost identical you yours. The Part I didn't know to do whas "std::". And the "endl" seems to be a thing of the past as well. Thanks for the help.
This should give you an idea of how long it's been since I worked with C++. You can get around using thinkgs like std::cout by adding a using clause: using namespace std; This will pull in the entire std namespace or: using std::cout; using std::endl; These will allow you to use both cout and endl. #include <iostream> using std::cout; using std::endl;
int main( int argc, char *argv[] ) { cout << "derek" << endl; return 0; } gaf@gaf:~/src> g++ derek.cpp -o derek gaf@gaf:~/src> ./derek derek #include <iostream> using namespace std; int main( int argc, char *argv[] ) { cout << "derek" << endl; return 0; } gaf@gaf:~/src> g++ derek.cpp -o derek gaf@gaf:~/src> ./derek derek -- Gerald Feldman <gfeldman@attbi.com> Boston Computer Solutions and Consulting ICQ#156300 PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
On Friday 28 March 2003 02:13 am, Steven T. Hatton wrote:
I tried to write the most basic hello world program I know of in c++ and I am getting deprication messages from gcc when I compile. Looking through the the documentation I have on line has merely lead to several levels of indirection. What am I supposed to use insted of <iostream.h>? And where do I find documentation on this which won't take me an hour to figure out how to use basic standard in and standard out?
STH =====================
Steven, This is my most basic "hello world" in c++. How does yours differ? #include <iostream.h> int main() { cout << "Hello World!\n"; return 0; } Patrick -- --- KMail v1.5 --- SuSE Linux Pro v8.1 --- Registered Linux User #225206 On any other day, that might seem strange...
the latest version of gnu c++ conforms more to the c++ standard. This standard as dropped the .h so you need to use: #include <iostream> using namespace std; for gcc3.1 and newer. On Friday 28 March 2003 9:11 am, O'Smith wrote:
On Friday 28 March 2003 02:13 am, Steven T. Hatton wrote:
I tried to write the most basic hello world program I know of in c++ and I am getting deprication messages from gcc when I compile. Looking through the the documentation I have on line has merely lead to several levels of indirection. What am I supposed to use insted of <iostream.h>? And where do I find documentation on this which won't take me an hour to figure out how to use basic standard in and standard out?
STH
=====================
Steven, This is my most basic "hello world" in c++. How does yours differ?
#include <iostream.h>
int main() { cout << "Hello World!\n"; return 0; }
Patrick
-- Tom Bradley Software Engineer Jaycor / Titan Systems
On Friday 28 March 2003 11:11 am, O'Smith wrote:
Steven, This is my most basic "hello world" in c++. How does yours differ?
#include <iostream.h>
int main() { cout << "Hello World!\n"; return 0; }
Patrick
Perhaps you have deprication messages turned off, or you don't care about them. I understand this will compile. I just want to know what Stallman et al think I /should/ be doing. This is what I get with your code: g++ hello.cpp In file included from /usr/include/g++/backward/iostream.h:31, from hello.cpp:1: /usr/include/g++/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated. STH
#include <iostream.h>
int main() { cout << "Hello World!\n"; return 0; }
Perhaps you have deprication messages turned off, or you don't care about them. I understand this will compile. I just want to know what Stallman et al think I /should/ be doing.
If you're working with a language as complex as C++, and you really want the details, you need a copy of the standard. It costs money, and isn't free to distribute, but the GCC coders bought a copy and worked to it. If you want to know what Stallman et al were thinking, read the standard. Then you'll know. For most of us, a copy of the Stroustrup book is adequate.
g++ hello.cpp In file included from /usr/include/g++/backward/iostream.h:31, from hello.cpp:1: /usr/include/g++/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
Which is clear enough, isn't it? The file "includes at least one deprecated or antiquated header". The code contains "#include <iostream.h>", whereas the standards compliant way to do it is "#include <iostream>". Have a look at /usr/include/g++/backward/iostream.h, which is the file you're including. Then have a look at /usr/include/g++/iostream which is the file you want (and which the backwards compatible header file pulls in for you). -- "...our desktop is falling behind stability-wise and feature wise to KDE ...when I went to Mexico in December to the facility where we launched gnome, they had all switched to KDE3." - Miguel de Icaza, March 2003
On Sun, 30 Mar 2003 22:34:35 +0800 Derek Fountain <derekfountain@yahoo.co.uk> wrote:
If you're working with a language as complex as C++, and you really want the details, you need a copy of the standard. It costs money, and isn't free to distribute, but the GCC coders bought a copy and worked to it. If you want to know what Stallman et al were thinking, read the standard. Then you'll know. For most of us, a copy of the Stroustrup book is adequate. I fully concur with Derek. If you are programming in any language, C, C++, Java, COBOL, or even ADA, you should have at least one book to use as a reference as well as some online references to keep track of recent changes as well as compiler differences. I have among my references, the original K&R, K&R 2nd edition, Stroustrup and several more books. If you are a newcomer to C++ or computer programming in general, there are several good (and bad) tutorial books.
-- -- Gerald Feldman <gfeldman@attbi.com> Boston Computer Solutions and Consulting ICQ#156300 PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
On Sunday 30 March 2003 10:18 am, Jerry Feldman wrote:
On Sun, 30 Mar 2003 22:34:35 +0800
Derek Fountain <derekfountain@yahoo.co.uk> wrote:
If you're working with a language as complex as C++, and you really want the details, you need a copy of the standard. It costs money, and isn't free to distribute, but the GCC coders bought a copy and worked to it. If you want to know what Stallman et al were thinking, read the standard. Then you'll know. For most of us, a copy of the Stroustrup book is adequate.
I fully concur with Derek. If you are programming in any language, C, C++, Java, COBOL, or even ADA, you should have at least one book to use as a reference as well as some online references to keep track of recent changes as well as compiler differences. I have among my references, the original K&R, K&R 2nd edition, Stroustrup and several more books. If you are a newcomer to C++ or computer programming in general, there are several good (and bad) tutorial books.
-- -- Gerald Feldman <gfeldman@attbi.com>
I have Ellis and Stroustrup's _The Annotated C++ Reference Manual_, as well as _Object-Oriented Programming Using C++_ by Ira Pohl, _Mastering C++_ by Cay Horstmann, and a few others. I guess I'm just used to Java's SDK, and JBuilder. This was my first Java 3D program: http://public.globalsymmetry.com/projects/math-3d/magic-cube.html It took me about 3 days of hard work to go from downloading the Java3D SDK to getting that running. This, my second effort, was about the same amount of work: http://public.globalsymmetry.com/projects/math-3d/living-basis.html This I wrote in Mathematica using the OO package from Roman Maeder's _Computer Science with Mathematica_. The file is quite large 23M, and requiers Math Reader or Mathematica: http://public.globalsymmetry.com/projects/lorenz3d/lorenz3D-scene1.nb This one is 63M uncompressed, and 16M compressed: http://public.globalsymmetry.com/projects/lorenz3d/lorenz3D-scene3.zip I haven't looked at these in months, I've been off studying ancient history, archaeology, linguistics and comparative religion. That's what got me looking at QT. I need an interface for a linguistics tool I want to write. STH
On Sun, 30 Mar 2003 11:06:15 -0500 "Steven T. Hatton" <hattons@globalsymmetry.com> wrote:
I have Ellis and Stroustrup's _The Annotated C++ Reference Manual_, as well as _Object-Oriented Programming Using C++_ by Ira Pohl, _Mastering C++_ by Cay Horstmann, and a few others. I guess I'm just used to Java's SDK, and JBuilder. This was my first Java 3D program: JBuilder is an excellent tool, but it is not Java programming per se. You've got some good references. -- -- Gerald Feldman <gfeldman@attbi.com> Boston Computer Solutions and Consulting ICQ#156300 PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
participants (7)
-
Derek Fountain
-
Jerry Feldman
-
John Lamb
-
Mads Martin Jorgensen
-
O'Smith
-
Steven T. Hatton
-
Tom Bradley