Questions about C++

Good Morning Programmers,

I am new to C++ and before I start on it, I have a few questions regarding it.

1) Correct my concept of Libraries if its wrong:

Libraries are like add-ons for C++ language for more advanced coding as a library as extra commands you can add in your program to produce better softwares. Is this correct?

2) How can you make your application (whether just a simple DOS program or a GUI software) compatible with either 32 bit or 64 bit hardware?

I'm very confused here. I would really like to know because there are in fact many softwares which can run on both hardwares and most only on one. Now before I start coding even a DOS program, tell me how is a program made compatible for a certain hardware. Does it depend on your OWN system's hardware that if its 64bit, whatever you code will be in 64bit also? And, if its possible to manage the compatibility, then how can it be done? Is it also possible to make it compatible for BOTH hardwares?

3) How is a GUI application made with C++?

I've seen and read that there is a library which allows you to create an average looking GUI application with codes like for buttons and main window etc, is this correct? Does such a library exist and if it does then how hard is it to create a GUI with it? Secondly, I've seen on tutorials that people mostly use Visual C++ as a default for IDE or Visual Studio because it allows you to create GUI just by drag and dropping the objects, is this true? Which one is better or both are better?

4) Tell me in advance how the following can be done in C++

All right, so before I ask you how, I'd like to tell you why. I basically want to use C++ to develop programs, both GUI and DOS to speed up my work (I'm a freelancer) for example automating some tasks. I pretty well know that its not easy but its not impossible also, so please do not discourage me and just help me. Now to the how question.

How can I make C++ do specific actions for me such as opening a webpage, filling some fields, and pressing a button like Submit? Also, I've seen softwares which can open and do actions ON WEBSITES at the back. I mean, they don't show you that the action has been done, but its just done. For example, a software which allows you to automatically login into your HOTMAIL ACCOUNT or suppose your are already logged in and you close the hotmail window but don't sign out of your account, now you run the software which will automatically post an email for you to a specific person but it will not do it on screen, because that is stupid that you see your software visually opening hotmail again on your screen and doing the email, but instead doing it at the back. And when you see the hotmail by yourself, you can see that the email was really sent.

Now mainly, I want to know this:
Opening a webpage, filling (a) SPECIFIC field(s), pressing buttons on webpage

You don't need to post the whole code for this but I just want to know how it can be done and what combination of commands/functions I need to use. And I hope that this type of thing can also be developed as a DOS program, isn't it? I mean as those are just actions, opening a webpage, pointing the software to fill a specific field or fields and then pressing a button. If its not possible to do it in DOS, then tell me a reason and tell me where can it be done, does it need to be a GUI software to make this type of software?

-----------

Thank you very much in advance.
1) I wouldn't describe libraries as "extra commands". Libraries are collections of classes and/or functions. Each library has a specific purpose. Implement a GUI, implement advanced math, or whatever the author felt might be useful reusable code.

2) Generating 32 bit or 64 bit code is a function of your compiler. Modern compilers have a command line switch (or a setting in the IDE) that enables 64 bit code generation. Not dependent on your hardware. Of course, if you generate a 64 bit object file on a 32 bit machine, it won't run on that machine.

3) There are many GUI libraries available. SFML, QT, the Windows API, and a number of others. One of the key considerations is if you want your GUI code to be cross-platform. Yes, you can drag and drop objects in Visual Studio. Keep in mind that VS is platform specific.

4) You might want to look at a library called CURL.
http://curl.haxx.se/libcurl/


Last edited on
1) I think OP has it described pretty correctly, if simply.
   A library is a bunch of functions/etc that someone else has written and packaged up for you to use.

2) @AA

3) http://www.cplusplus.com/faq/intro/#gui-desktop-app

4) There are a variety of ways, but the best is suggested by @AA
Topic archived. No new replies allowed.