Solved

Visual C++ 6.0

Posted on 2004-04-20
6
1,110 Views
Last Modified: 2013-12-14
I see MS Visual C++ in Visual Studio 6.0 Package.  I have never tried it before and find it a kind of magic where and how to start with.  

1) Can anyone sugest me a free online tutorial or downloadable material that I can learn from it ?

2) What is the advantage of working with Visual C++ over Visual Basic ?


Thank you
0
Comment
Question by:COOMET
6 Comments
 
LVL 11

Expert Comment

by:avizit
ID: 10866942
1.  tutorial site
http://elvis.rowan.edu/~kay/cpp/vc6_tutorial/  

2.  first of all VC++ and VB are based on two different languages.
we can have hell lot of debates over the pros and cons of both but most of us would still agree that C++ is a more powerful language.
perosnally i have never coded in VB but if from what i hear if you want to implement simple applications but with menus/buttons etc VB might be a better choice  .. *shrugs*

/abhijit/






0
 
LVL 48

Expert Comment

by:AlexFM
ID: 10866998
What is the advantage of working with Visual C++ over Visual Basic ?

Visual Basic 6.0 belongs to past. It is replaced with .NET languaged (VB.NET, C#) and there is no reason to learn it now.

If your tasks are mainly database programming, UI, WEB, you can learn C# or VB.NET (all .NET languages are almost same, if you know one of them, you know all). If you need real-time programming, high performance, full control over computer resources, advanced graphics, multithreading etc. - start with VC.
0
 
LVL 3

Expert Comment

by:akalmani
ID: 10868158
Check this out for VC++ tutorials and other links
http://www.cetus-links.org/oo_visual_c_plus_plus.html

0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 2

Accepted Solution

by:
ram_einstein earned 35 total points
ID: 10885954
Hi COOMET,

Like you, I also used to program in Visual Basic. I was wondering what Visual C++ was. But now I have realised the power of Visual C++. I have sufficient experience in both languages to explain the differences. I'll try to give Visual Basic equivalents for everything.

Online tutorials are good once you prgress to some level in C++ but they fail to explain what to to as soon as you open Visual C++ so let me give you an introduction to C++

This is a language for which programs can be written in plain text (Unlike Visual Basic). Just fire up any ASCII text editor (like notepad), write your program, change the extension from *.txt to *.cpp or *.c (cause thats the file extension that C++ compilers can compile) and compile it to make an exe file. All you need to make a C++ program is a text editor (to write the code and create a text file) and a compiler (to convert the cpp file to an exe file). Don't worry just yet, I'll walk you through how to create a program.

What is a workspace or project?
You come across this in Visual Basic. But from what I have said about C++ you must be wondering why you need a project workspace as you build programs just using text.

Sometimes, the code might extend to pages. For example, if you have a program with a file menu, edit menu etc, it doesn't make sense to have all parts of the code for in the same text file. So make different text files for the program, file menu and the edit menu. So when I click on file, the program should refer to the code given in file.cpp (or whatever you name the text file containing the code fot the file menu)

Now how do I know where the text files is stored? So you have something called a workspace that binds all the files of the project (or program). The project files made depend upon your compiler.

I will try to talk in terms of Microsoft Visual C++, the most famous (and probably the most expensive) compiler. It makes two project files: *.dsw (Project workspace) and *.dsp (Project file) [Just tike the vbw and vbp files in Visual Basic]. To start with a new project:

1. Open Microsoft Visual C++
2. Go to File > New and select "Win32 Console Application" (Forget the others for now)
3. Fill up the Project name (say x) and location (desktop) text boxes
4. Select "Empty project"
5. The compiler automatically creates a folder named x on your desktop with the files x.dsp, x.dsw and x.ncb (don't worry about this for now) and an empty folder "debug"
6. Now the project has been created but it does not contain any files (which means it contains no code and nothing to execute) [Equivalent to no forms in Visual Basic]
7. To add a text file to the project, select Project > Add to Project > New > C++ source file [Equivalent to a frm file in Visual Basic] with the name x. Now the compiler creates a file called x.cpp in the x folder on your desktop.
8. The text file also appears on your screen. Now write some code. (You might not understand head or tail of this) An example:
*******************************************************************
#include <iostream.h>
#include <stdlib.h>

int main(){
     cout << "Hello World" << endl;
     system("PAUSE");
     return EXIT_SUCCESS;
}
*******************************************************************
9. Select Build > Compile x.cpp
10. Select Build > Execute x.exe

Note that the exe file (x.exe) is created in the debug subfolder in the x folder on your desktop. Now you don't need a compiler to run it [Just like a Visual Basic exe file]. The program is now just one exe file that can be run on any comp.

If this program came through without any problems and you want to learn the basics of C++, http://www.robertjacobs.fsnet.co.uk/ is a good tutorial. Ask me if you don't understand anything.

#################################################################
Now we progress to the second part of your question: Is Visual C++ superior to Visual Basic? How?
The answer is yes. It is superior. Though it is slightly harder to learn in the beginning, advanced stuff will be easy. Let me give you an example: How do you read and write text files in Visual Basic? The process is complicated. Or what do you do if you want to make a whacy media player like Winamp on Visual Basic? Its way beyond your reach because making the form non-rectangular is virtually impossible. What are computer games made on OpenGL and DirectX libraries in C++. Do you see a game made on Visual Basic?

The second advantage in building C++ programs: Visual Basic progams can only be run on a computer with Visual Basic runtime files installed. C++ rograms on the other hand, can be run on any computer. It does not require runtime files.

Thirdly, you are not restricted to using predefined commands (like in Visual Basic: members; you cannnot change the members of a control unless you make a new control which is mindblowingly hard). In C++ you can create your own commands by writing header files.
#################################################################

Post any questions/clarifications here.

Hope this helps,

Ram
0
 
LVL 2

Expert Comment

by:ram_einstein
ID: 10886044
Check out http://www.functionx.com/cpp/index.htm also. It has an excellent beginner's tutorial.
0
 

Author Comment

by:COOMET
ID: 10888273
Hello ram,

I than you a lot for find your systematic and very instructive comments and suggested links.   I'm sure that I will learn a lot out of all those materials.  The tutorials are very instructive supported with sample codes that one can rarely find in the  net.  It is easier to find vb resources very easily compared to cpp resources...and as you said most of the materials I saw in the net fail to provide the elements you explained here.

Again, thanks
Coomet
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now