This is an archive of CompuServe forum messages from 1985 to 1995, as saved in transcripts by John Foust.
Search Results (17 messages)
#This time a ZTC++ bug?
Message #24608
/*———————————————————————— OK, this time I think I have found a bug in the Zortech compiler. I get the following error message: m11 = v.x ; ^ "gold2.cpp", line 29 Syntax error: member 'x' of class 'Vector' is private I thought I took care of the privacy problem by making my…
Thanks John. -Bob
What is this 'ARM'? Is it AT&T's C++ v2.0 spec? If so, I think its time I got my hands on it. Perhaps Walter should add the second error/warning message that Phil listed from cfront. That got me thinking, why, when a language is standardized, don't they try to standardize…
Thanks, Phil.
So, if you had 2 classes, each with a friend function which is also a member of the other class, the only way to handle this is to make one class a friend of the other? In such a situation it seems that the forward references catch up with you,…
John, See Phil's message and my reply. It doesn't seem to be a bug, just a 'gotcha' of C++. Thanks for the help. -Bob nst Vector& v1 ) ; says is "function 'trans' belonging to class 'Matrix' is granted access to 'Vector's private members". No knowledge of Matrix is required…
Phil, I found your answer in Lippman's book (p.179). I would have thought that my friend declaration was ok, because all the line friend void Matrix::trans( const Vector& v1 ) ; says is "function 'trans' belonging to class 'Matrix' is granted access to 'Vector's private members". No knowledge of Matrix…
#C++ Forward Referencing
Message #24504
/*———————————————————————— Some C++ questions: The attached code gives me the following error under Zortech C++ v2.06. m11 = v1.x ; ^ "test.cpp", line 26 Syntax error: member 'x' of class 'Vector' is private I have tried to get support from Zortech to no avail. Am I doing something wrong in…
I'm gonna take a look at the disassembled code to see exactly what is going on. Actually, I already did this but, not being proficient at assembly language, I didn't give it a lot of time. I'll make an integer version of my code to keep the asm simple, and…
John, > The _TEMxx is the hidden parameter for the answer area. The caller > tells the function where to put the result. Is this "answer area" required when *not* using variadic functions? I have a vector class which looks (more or less) like this: class vector { int x,…
Yes…again I let the jargon get the best of me. I figured that out just a little after posting the my message. Thanks. -Bob
Hey– I like that void abs( unsigned ); bit you did! Continuing with C++ a little, the Zortech readme file states: > Variadic Pascal and C++ functions that return structures return them in a > static temporary rather than on the stack….. What? More nomenclature?!? What are "variadic" functions?? and…
Greg, Thanks for you very complete answer to a long-standing question of mine. I wanted to digest it a bit before replying, so, sorry for my delay. I appreciate the "neatness" of encapsulating functions with their associated data. The other features of OOP you discussed seem to stem from the…
Well, maybe with some better books (such as the ones you have mentioned) and some more compilers, C++ will finally go into widespread use. One question: Whenever people speak of OOPs they go on and on about how the code is reusable. I can't figure out why C++ code is…
I'll look for it at the store! -Bob
Thanks for clearing up the 'const' thing. I have Stroustrup's book. Maybe he should have let K&R do his writing for him. Right now its a toss up between Dewhurst/Stark and Lippman. If I buy anything else I'll bust the bank. -Bob great! Maybe now I can get serious about…
#24291-
#C++ &-Referencing
Message #24302
You know, with all the computer-related magazines I have seen, I don't remember having seen Computer Language. I'll look for it. I recieved Zortech 2.0 today and started playing with it a bit. Its a tremendous improvement over 1.07. The debugger is great! Maybe now I can get serious about…