Solved

stupid beginner's question

Posted on 1998-06-04
4
260 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

624 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