Hi, I am currently switching from Java to C++.
When I code in Java, I use the following website to find the
specifications of classes and methods: http://java.sun.com/j2se/1.5.0/docs/api/
I think there must be several websites providing similar information
for C++.
I did find some but they were not as good as I expected.
Could you guys recommend some good ones?
Thanks! 11 1952
On Jul 25, 5:23 am, xz <zhang.xi...@gmail.comwrote:
Hi, I am currently switching from Java to C++.
When I code in Java, I use the following website to find the
specifications of classes and methods:
http://java.sun.com/j2se/1.5.0/docs/api/
I think there must be several websites providing similar information
for C++.
I did find some but they were not as good as I expected.
Could you guys recommend some good ones?
Thanks!
In C++ there is no API reference like Java has. Each library has its
own reference. There fore it depends what kind of library you are
using (STL, ZeusFramework, MFC etc.)
The ZeusFramework has lots of classes similar to Java (Lists, Maps,
String, Calendar and much more).
It also includes RMI for C++, Serializing and networking
See http://www.xatlantis.ch/api/zeusbase/index.html
On Wed, 25 Jul 2007 11:05:04 -0700, bhadorn wrote:
>The ZeusFramework has lots of classes similar to Java (Lists, Maps, String, Calendar and much more). It also includes RMI for C++, Serializing and networking See http://www.xatlantis.ch/api/zeusbase/index.html
<offtopic>
Unfortunatey, Zeus seems to be unaware of RAII, the central C++ idiom,
e.g. http://www.xatlantis.ch/examples/zeu...ple.html#Step1 http://www.xatlantis.ch/examples/rmi_example.html#Step4
Tranferring the usability and convenience of Java libraries to C++ is
certainly a good idea (usable C++ libraries are sorely needed). But
these libraries should use C++ styles and idioms where they provide
much better solutions (e.g. for resource handling).
</offtopic>
--
Roland Pibinger
"The best software is simple, elegant, and full of drama" - Grady Booch
I'm aware that throwing exceptions is not supported by Zeus-Framework,
if you mean that. There are very good reasons not using exceptions
with C++. Since C++ has no GC, it might cause resource leaks and
unexpected program states witch is really ugly.
Zeus supports interfaces, software modules written in different
program languages (so, dll). Exceptions are a problem here. For
complex application, I prefer using return values.
PS: By the way, I think those problems were known to other development
teams as well. Thats why COM uses return values and not exceptions.
On Wed, 25 Jul 2007 11:05:04 -0700, bhadorn wrote:
The ZeusFramework has lots of classes similar to Java (Lists, Maps,
String, Calendar and much more).
It also includes RMI for C++, Serializing and networking
Seehttp://www.xatlantis.ch/api/zeusbase/index.html
<offtopic>Unfortunatey, Zeus seems to be unaware of RAII, the central C++ idiom,
e.g.http://www.xatlantis.ch/examples/zeu...ple.html#Step4
Tranferring the usability and convenience of Java libraries to C++ is
certainly a good idea (usable C++ libraries are sorely needed). But
these libraries should use C++ styles and idioms where they provide
much better solutions (e.g. for resource handling).
</offtopic>
--
Roland Pibinger
"The best software is simple, elegant, and full of drama" - Grady Booch
On Thu, 26 Jul 2007 23:18:37 -0700, bhadorn wrote:
>I'm aware that throwing exceptions is not supported by Zeus-Framework, if you mean that.
I mean this: http://en.wikipedia.org/wiki/RAII
Admittedly, I've only looked at the examples at your web-site and the
style in which they are written.
>There are very good reasons not using exceptions with C++.
In some cases yes, certainly not in general. More often than not
exceptions make programs safer and considerably clean up code.
>Since C++ has no GC, it might cause resource leaks and unexpected program states witch is really ugly.
Quite the contrary!
--
Roland Pibinger
"The best software is simple, elegant, and full of drama" - Grady Booch
On Jul 27, 2:18 am, bhadorn <b_had...@bluewin.chwrote:
There are very good reasons not using exceptions
with C++. Since C++ has no GC, it might cause resource leaks and
unexpected program states witch is really ugly.
That's one of the reasons you were suggested to use RAII. Unlike GC,
it will help you manage all resources, not just memory, and not just
for exceptions.
To learn how to write exception-safe code with C++ I highly recommend
the book "Exceptional C++", by Herb Sutter: http://www.amazon.com/exec/obidos/AS...622/peerdirinc
"Roland Pibinger" <rp*****@yahoo.comwrote in message
news:46**************@news.utanet.at...
On Thu, 26 Jul 2007 23:18:37 -0700, bhadorn wrote:
>>I'm aware that throwing exceptions is not supported by Zeus-Framework, if you mean that.
I mean this: http://en.wikipedia.org/wiki/RAII
Admittedly, I've only looked at the examples at your web-site and the
style in which they are written.
>>There are very good reasons not using exceptions with C++.
In some cases yes, certainly not in general. More often than not
exceptions make programs safer and considerably clean up code.
I thought the accepted rule of thumb was: "use a return code when you can,
use exceptions when you have to". ???
John
>>Since C++ has no GC, it might cause resource leaks and unexpected program states witch is really ugly.
Quite the contrary!
Uh oh: exception AND GC talk in one post... could very well be a TROLL!
John
JohnQ wrote:
>
"Roland Pibinger" <rp*****@yahoo.comwrote in message
news:46**************@news.utanet.at...
>On Thu, 26 Jul 2007 23:18:37 -0700, bhadorn wrote:
>>I'm aware that throwing exceptions is not supported by Zeus-Framework, if you mean that.
I mean this: http://en.wikipedia.org/wiki/RAII Admittedly, I've only looked at the examples at your web-site and the style in which they are written.
>>There are very good reasons not using exceptions with C++.
In some cases yes, certainly not in general. More often than not exceptions make programs safer and considerably clean up code.
I thought the accepted rule of thumb was: "use a return code when you
can, use exceptions when you have to". ???
Accepted by whom?
--
Ian Collins.
"Ian Collins" <ia******@hotmail.comwrote in message
news:5g*************@mid.individual.net...
JohnQ wrote:
>> "Roland Pibinger" <rp*****@yahoo.comwrote in message news:46**************@news.utanet.at...
>>On Thu, 26 Jul 2007 23:18:37 -0700, bhadorn wrote: I'm aware that throwing exceptions is not supported by Zeus-Framework, if you mean that.
I mean this: http://en.wikipedia.org/wiki/RAII Admittedly, I've only looked at the examples at your web-site and the style in which they are written.
There are very good reasons not using exceptions with C++.
In some cases yes, certainly not in general. More often than not exceptions make programs safer and considerably clean up code.
I thought the accepted rule of thumb was: "use a return code when you can, use exceptions when you have to". ???
Accepted by whom?
Smart software developers? :P ;)
John
On Fri, 27 Jul 2007 23:22:41 -0500, "JohnQ" wrote:
>I thought the accepted rule of thumb was: "use a return code when you can, use exceptions when you have to". ???
I wouldn't support that rule.
Instead of:
int foo1() {
if (doSomething() == XYZ_OK) {
// ...
if (doSomethingElse() == ABC_OK) {
// ...
} else {
// error handling
}
} else {
// error handling
}
// ...
return errVal;
}
I want to write:
void foo2() {
doSomething();
doSomethingElse()
}
--
Roland Pibinger
"The best software is simple, elegant, and full of drama" - Grady Booch
On Jul 28, 6:22 am, "JohnQ" <johnqREMOVETHISprogram...@yahoo.com>
wrote:
"Roland Pibinger" <rpbg...@yahoo.comwrote in message
news:46**************@news.utanet.at...
On Thu, 26 Jul 2007 23:18:37 -0700, bhadorn wrote:
>I'm aware that throwing exceptions is not supported by Zeus-Framework, if you mean that.
I mean this:http://en.wikipedia.org/wiki/RAII
Admittedly, I've only looked at the examples at your web-site and the
style in which they are written.
>There are very good reasons not using exceptions with C++.
In some cases yes, certainly not in general. More often than not
exceptions make programs safer and considerably clean up code.
I thought the accepted rule of thumb was: "use a return code when you can,
use exceptions when you have to". ???
The generally accepted rule of thumb is to select the most
appropriate form of error reporting, depending on the type of
error and the context in which it appears. There are definitly
cases where exceptions are the most appropriate form, even
sometimes when return codes would be possible. (And of course,
return codes and exceptions are far from the only
possibilities.)
--
James Kanze (Gabi Software) email: ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
bhadorn a écrit :
On 27 Jul., 13:13, Michael DOUBEZ <michael.dou...@free.frwrote:
>bhadorn a écrit :
>>I'm aware that throwing exceptions is not supported by Zeus-Framework, if you mean that.
Do you mean you are exception neutral or that you simply ignore the exceptions part ?
>>There are very good reasons not using exceptions with C++.
I known of some reasons but I am curious about what you call VERY GOOD reasons.
I just updated my website. There you find the very good reason, why
Zeus-Framework does not use exception externaly. http://www.xatlantis.ch/education/interfaces.html
You are mixing Borland binaries with VC++ binaries. I can see where it
can be useful but I wouldn't wager on its reliability.
Concerning exception, IIRC windows has a specific system called
Structured Exception Handling (SEH for the intimates) which mess with
the stack and the way it unwinds; I don't know more about it, it's not
my application field. Perhaps it is the reason why you got those
problems. A MSVC group may tell you more about it.
Michael This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: rick cameron |
last post by:
TimeZone - the only instance you can get is one representing the local time
zone
DateTime - cannot represent a time before 00:00:00 1 Jan 1 CE
What were they thinking? This is a serious question...
|
by: Niklas |
last post by:
H
What is Java Webstart counterpart in .NET
Regard
/Niklas
|
by: Richard |
last post by:
Level: Java newbie, C experienced
Platform: Linux and Win32, Intel
Another programmer and I are working on a small project together.
He's writing a server process in Java that accepts input...
|
by: Carlitos |
last post by:
Hi there,
What would be the counterpart for Java's StringTokenizer class in .NET?
In fact, does anybody know a good web site that gives this kind of
information, like a Java-.NET/.NET-Java...
|
by: Carlitos |
last post by:
Hi there,
Does anybody know what would be the counterpart of Java's URL Class in .NET?
Also, does anybody know a good web site or reference book that would give
this kind of information (like...
|
by: JD |
last post by:
hi, i m new to java, i want to know if there is a good and free Java IDE
that i can use that'll help me, i dont care if its complicated , i just
want it to be good, i tried netbeans which comes...
|
by: s0suk3 |
last post by:
I've been programming Python for a couple of years now. Now I'm
looking to move on to either C++ or Java, but I'm not sure which.
Which one do you think will be a better transition for a Python...
|
by: King Raz |
last post by:
The shootout site has benchmarks comparing different languages. It
includes C# Mono vs Java but not C# .NET vs Java. So I went through
all the benchmark on the site ...
...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
| |