#include <cstdlib>
#include <iostream>
#include <string>

using namespace std;
string name = "";

int main(int argc, char *argv[])
{
    cout << "Hi, whats your name? ";
    cin>>name
    cout << end1<<  "Well Hello " << name.c_str() 
    << "Please provide me two numbers on 2 seperate lines ";
    cin>>number1;
    cin>>number2;
    cout(number1+number2) "Is the sum of those two numbers";
    system("PAUSE");
    return EXIT_SUCCESS;
}

Im practing and trying to make something that asks the perosn for their name, greets them than asks them for 2 numbers and gives them the sum of the two numbers.

Im getting some errors and idk how to fix it

cin>>name

You're missing a semicolon to terminate the statement.

cout << end1<<  "Well Hello " << name.c_str()

It's endl, with a lower case L, not end1 with the number 1. Edward would recommend using a font that makes that distinction. Ed uses Consolas.

cin>>number1;
cin>>number2;

number1 and number2 haven't been declared.

cout(number1+number2) "Is the sum of those two numbers";

Change ( and ) to <<. ;)

This is just with those fixes:

#include <cstdlib>
#include <iostream>
#include <string>

using namespace std;
string name = "";

int main(int argc, char *argv[])
{
  int number1, number2;
  cout << "Hi, whats your name? ";
  cin>>name;
  cout << endl<<  "Well Hello " << name.c_str() 
    << "Please provide me two numbers on 2 seperate lines ";
  cin>>number1;
  cin>>number2;
  cout<<number1+number2<< "Is the sum of those two numbers";
  system("PAUSE");
  return EXIT_SUCCESS;
}

There are other improvements that Ed is itching to suggest, but for now you should just play around with the code and have fun. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.