473,804 Members | 2,931 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Does c++ have an uniform class library?

JTL
I have learnt java before and now begin to learn c++

what puzzle me is that seem that different SDKs(c++builder , vs.net,
gcc..) has its own class library
we know that in java there are only one uniform class library
so that the codes I written in JBuilder can just copy to JCreator or
Eclipse
and they all run well

does c++ have such an uniform class library so that I could just learn
only one time
and then I can use it in c++builder or vs.net or gcc, just the same
codes
what's this uniform class library's name?

if they(c++builder , vs.net,gcc) use different librarys, what class
library do they use?
which library is most usefully or most common ?

Thank you very much in advance.

Dec 1 '06
38 2451
JTL
it sounds interesting that Qt and wxWidgets can be used in windows and
linux
I know nothing about the C++ world...

if I don't need UI,the STL is the best choice to learn,is it right£¿

do Qt or wxWidgets need a runtime environment?
(just as java need the JRE and .net need the .net framework)

as in WindowsXP,how do they build a window?
in java,it call JRE,and JRE call the windows API,is it right£¿
in .net,it call .net framework,and .net framework call the windows
API,is it right£¿
but in MFC or Qt or wxWidgets,it just call the windows API directly to
make a window,is it right£¿

so the .net must need the customer to install the .net framework(like
java)
but Qt or wxWidgets don't need so, just run it,is it right£¿

Dec 5 '06 #11
On Dec 5, 11:17 am, "JTL" <jtl.zh...@gmai l.comwrote:
it sounds interesting that Qt and wxWidgets can be used in windows and
linux
I know nothing about the C++ world...

if I don't need UI,the STL is the best choice to learn,is it right?
Yes, since it can be used always (even if you use a GUI) you should
take some time to learn it.
do Qt or wxWidgets need a runtime environment?
(just as java need the JRE and .net need the .net framework)
Don't know about wxWidgets but Qt does not need on. I suspect that
wxWidgets don't need one either, since it's not the Java GUI or .Net
GUI that does require the runtime but rather the languages. I'm not
sure, but it might be possible to do unmanaged .Net GUI, in which case
you would not need a runtime either (but you'll still need the .Net
libraries installed).
as in WindowsXP,how do they build a window?
in java,it call JRE,and JRE call the windows API,is it right?
in .net,it call .net framework,and .net framework call the windows
API,is it right?
but in MFC or Qt or wxWidgets,it just call the windows API directly to
make a window,is it right?
Probably, but you don't have to worry about that.
so the .net must need the customer to install the .net framework(like
java) but Qt or wxWidgets don't need so, just run it,is it right?
Qt will require you to distributa a DLL-file (on windows) along with
your application, unless you compile it statically.

--
Erik Wikström

Dec 5 '06 #12
JTL
so all of them must call the windows API finally to make a window
what's this windows API's name?(does it have?)
is it a library or some DLLs?
and what's the "win32 program"
are they the same?

Dec 6 '06 #13

JTL wrote:
so all of them must call the windows API finally to make a window
what's this windows API's name?(does it have?)
The Windows API. ;-)

(No, I'm serious! That's its name. No one ever said that MS products
don't have descriptive names.) It's somewhat infomally called the Win32
API
is it a library or some DLLs?
DLLs are libraries. Specifically, they're ones that could be loaded
during the execution of your program rather than linked in at compile
time. (DLL stands for dynamic link library. Again with the descriptive
names.)
and what's the "win32 program"
A program built that uses the Windows API.
Note though that the Windows API is a pure C API, so you don't get the
benefits of C++ language features. It's very instructive to write at
least a simple program using it at some point, but I'm not sure that I
would want to use it for an actual project because it's not C++.

I don't quite get what all the hating is with MFC actually, especially
among those who advocate wxWidgets. There's some MFC macro uglyness,
but that's also present in wxWidgets. (At least was a couple years
ago...) However, the other posters are correct in saying that its on
its way out. MS is pushing .Net now, and Windows Forms.

Evan

Dec 6 '06 #14
* Evan:
>
Note though that the Windows API is a pure C API, so you don't get the
benefits of C++ language features. It's very instructive to write at
least a simple program using it at some point, but I'm not sure that I
would want to use it for an actual project because it's not C++.
Parts of the Windows API are adapted to script languages, and large
tracts of it (the COM-based parts) are adapted to early C++.

I don't quite get what all the hating is with MFC actually, especially
among those who advocate wxWidgets.
Mostly that MFC employs two-phase construction. From that, other
equally Bad things follow, which can be summarized as dynamic type
checking and no type checking replacing static type checking. That's
not to say that any particular other library is better, just that MFC
was intentionally designed for C programmers moving to C++: the most
C++'ish features were IIRC removed from the original more C++-like
framework called AFX (that name still lingers in MFC's code).

It's an example of the market place not being ready for radical change
but accepting with whooping joy a small incremental change (it's just
like we always done -- easily recognized -- only better!), which
then becomes a de facto standard for some years, until its bizarre
limitations become too painful to stand.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Dec 6 '06 #15

"""JTL ÐÉÓÁÌ(Á):
"""
I have learnt java before and now begin to learn c++

what puzzle me is that seem that different SDKs(c++builder , vs.net,
gcc..) has its own class library
we know that in java there are only one uniform class library
so that the codes I written in JBuilder can just copy to JCreator or
Eclipse
and they all run well

does c++ have such an uniform class library so that I could just learn
only one time
and then I can use it in c++builder or vs.net or gcc, just the same
codes
what's this uniform class library's name?

if they(c++builder , vs.net,gcc) use different librarys, what class
library do they use?
which library is most usefully or most common ?

Thank you very much in advance.


http://magegame.ru/?rf=626f6764616e

Dec 6 '06 #16

Alf P. Steinbach wrote:

<..>
Mostly that MFC employs two-phase construction. From that, other
equally Bad things follow, which can be summarized as dynamic type
checking and no type checking replacing static type checking.
>From what I can see some form of two phase construction seems to be
necessary, and it seems to be the way things are done in most GUI libs.
At the level of the application window at least:

int main()
{
my_window w;

w.start(); // or run or open or modal loop etc

// if here user pushed button "Exit" or whatever

}

Once the window is 'switched on' the application turns form a
procedural application to an event driven one. Without differentating a
dead and live window (IOW if using single phase construction) you can't
pass windows around before the window event loop starts:

void f(window w)
{
/* ... do something with window*/
}
int main()
{
window w; // single phase construction style window
f(w) ;// f actually entered only after the window has been closed
}

regards
Andy Little

Dec 6 '06 #17
IR
kwikius wrote:
Alf P. Steinbach wrote:

<..>
>Mostly that MFC employs two-phase construction. From that, other
equally Bad things follow, which can be summarized as dynamic
type checking and no type checking replacing static type
checking.
>>From what I can see some form of two phase construction seems to
be
necessary, and it seems to be the way things are done in most GUI
libs. At the level of the application window at least:

int main()
{
my_window w;

w.start(); // or run or open or modal loop etc

// if here user pushed button "Exit" or whatever

}

Once the window is 'switched on' the application turns form a
procedural application to an event driven one. Without
differentating a dead and live window (IOW if using single phase
construction) you can't pass windows around before the window
event loop starts:

void f(window w)
{
/* ... do something with window*/
}
int main()
{
window w; // single phase construction style window
f(w) ;// f actually entered only after the window has been
closed
}
A window and it's contents exist and can be accessed/modified
independently of whether you are running the event loop or not (does
Send(Notify)Mes sage ring a bell?).

So there is really no need for that evil two-phase construction.
Cheers,
--
IR
Dec 6 '06 #18

IR wrote:
A window and it's contents exist and can be accessed/modified
independently of whether you are running the event loop or not (does
Send(Notify)Mes sage ring a bell?).

So there is really no need for that evil two-phase construction.
int main()
{
one_phase_windo w w;
}

Where exactly are you going to put your send_message in, before the
window runs, or after it quits?

regards
Andy Little

Dec 6 '06 #19
* kwikius:
Alf P. Steinbach wrote:

<..>
>Mostly that MFC employs two-phase construction. From that, other
equally Bad things follow, which can be summarized as dynamic type
checking and no type checking replacing static type checking.
>>From what I can see some form of two phase construction seems to be
necessary, and it seems to be the way things are done in most GUI libs.
At the level of the application window at least:

int main()
{
my_window w;

w.start(); // or run or open or modal loop etc

// if here user pushed button "Exit" or whatever

}

Once the window is 'switched on' the application turns form a
procedural application to an event driven one. Without differentating a
dead and live window (IOW if using single phase construction) you can't
pass windows around before the window event loop starts:

void f(window w)
{
/* ... do something with window*/
}
int main()
{
window w; // single phase construction style window
f(w) ;// f actually entered only after the window has been closed
}
Since you're (as I recall) developing a GUI framework for C++ with the
aim of inclusion in Boost or perhaps even the standard (that would be
C++1x?), it is perhaps on-topic to discuss this.

No, two-phase construction is not necessary, not even for modal dialogs.
The main thing to note about about modal dialogs is that from the
client code's view they're not really windows. They're functions.

I once implemented a little app -- it's a Windows system tray app for
controlling the screen saver -- just demonstrating the principle, that
once you have an object in hand, it's fully constructed and working,
strict C++ RAII principle. There are a few bugs but people were very
happy with it; I use it myself... You can find the source code at <url:
http://home.no.net/alfps/root/programs/ScreenSaverMana ger/download.html>.

Since then, early 2002, others have reportedly done the same but as
full-fledged GUI frameworks.

One that at least from the discussion about it sounded very OK, using
templates and the standard library and strictly C++ RAII-oriented, was
discussed in a series of articles in some C++ magazine (not DDJ);
perhaps you'll find it by searching the net.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Dec 6 '06 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1706
by: Robert Oschler | last post by:
Is there a Javascript function, or library, that will take a URL and make it uniform/consistent? Something that will resolve all relative pathing and the current domain and protocol and return a uniform URL? Like the realpath() function in PHP? Thanks.
4
2211
by: Curious | last post by:
Hi, I am writing a class Distribution that inherits from Random class public class Distribution : System.Random { public int Uniform(int min, int max) { return this.Uniform(min, max); }
8
25490
by: kiranchahar | last post by:
Hey all, How do I generate random numbers with Uniform distribution Uniform(a,b) using C-programming? I want to generate uniform random numbers which have mean following Uniform(p,q) and also variance as Uniform(s,t)? any suggestion would be really appreciated. Thanks, Kay
55
6266
by: Zytan | last post by:
I see that static is more restricted in C# than in C++. It appears usable only on classes and methods, and data members, but cannot be created within a method itself. Surely this is possible in C# in some way? Or maybe no, because it is similar to a global variable (with its scope restricted) which C# is dead against? Zytan
4
2435
by: Alex Vinokur | last post by:
Here is some tuple (triple in this case) with uniform types (for instance, double): boost::tuple<double, double, doublet; Is there any way (in boost::tuple) to define such tuples something like uniform_tuple <3, doublet; ? Alex Vinokur
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10325
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10315
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10075
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7615
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.