Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

stupid beginner's question

Posted on 1998-06-04
4
Medium Priority
?
264 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
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.
Suggested Courses

718 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