Solved

stupid beginner's question

Posted on 1998-06-04
4
245 Views
Last Modified: 2010-04-01
I am just taking my first steps with C++ (Borland C++ Builder 3).
Until now I have only programmed with Visual Basic, so it's quite hard to understand the syntax of C++.

Can anyone give me a small sample listing, like letting the user enter two numbers and making a mathematical operation with them by button-click and writing the new number to an Edit box?

Does anyone know a good link to a C++ beginners page with simple samples?

Thank you.

E.C.
0
Comment
Question by:EricClapton
  • 3
4 Comments
 

Author Comment

by:EricClapton
ID: 1165277
Edited text of question
0
 

Author Comment

by:EricClapton
ID: 1165278
Edited text of question
0
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 100 total points
ID: 1165279
I highly would NOT recommend learning C++ on the Windows platform. Essentially, you would be learning too many different things all at once. It would be better to learn C++ using the command line compiler.

For example, you would create this program using standard C++:

  #include <iostream.h>
 
  int main()
  {
    int op1;
    int op2;

    cout << "Enter two numbers: ";
    cin << op1;
    cin << op2;

    // do something with operands
    int ans = op1 * op2;
    cout << "The product is " << ans << endl;
    return 0;
  }


0
 

Author Comment

by:EricClapton
ID: 1165280
Mhmm.. this didn't quite answer my question but anyway - you'll get the points.
Think I ought to get a book for C++ (I learned Visual Basic by just using the online-help but C++ really seems to a bit harder)

E.C.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
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 pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

828 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