Solved

stupid beginner's question

Posted on 1998-06-04
4
252 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
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 learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

751 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