Need help with C# code; am getting errors
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Need help with C# code; am getting errors

Hybrid View

  1. #1
    Join Date
    Nov 2012
    Posts
    2

    Need help with C# code; am getting errors

    I am not sure what I am missing or doing wrong but I am getting errors. Any help would be great. It is for my C# programming class, my friend said it looks like a C++ program though. Here is what I have:



    #include<iostream>

    #include<string>

    #include<iomanip>

    using namespace std;

    void DisplayApplicationInformation();

    void DisplayDivider(string);

    string GetInput(string);

    void TerminateApplication();

    int main()

    { string input,name;

    int age;

    double mileage;

    DisplayApplicationInformation();

    DisplayDivider("Start Program");

    DisplayDivider("Get Name");

    cout<<"Your age is:"<<name<<endl;

    DisplayDivider("Gas Mileage");

    mileage=atof(input.c_str())

    count<<"Your car MPG is:"<<setprecision920,fixed<<mileage<<endl;

    TerminateApplication()

    system("pause");

    return 0;

    }

    void DisplayApplication()

    {cout<<"Welcome the Basic User Interface Program\n";

    cout<<"CIS247,Week 1 Lab\n";

    cout<<"Name:Your Name\n";

    cout<<"This prgram accepts user input as a string, then makes the apprpriate data conversion\n\n";

    }

    void DisplayApplicationInformation()

    {cout<<"Welcome the Basic User Interface Program\n";

    cout<<"CIS247,Week 1 Lab\n";

    cout<<"Name:Your Name\n";

    cout<<"This program accepts user input as a string then makes the appropriate data conversion\n\n";

    }

    void DisplayDivider(string outputTitle)

    {cout<<"**************,,output Title<<****************\namespace";

    }

    string GetInput(string inputType)

    {string GetInput(string inputType,,"";

    cin>>strInput;

    cin>>strInput;

    return strInput;

    return strInput;

    }

    void TerminateApplication()

    {cout<<"Thank you for using the Basic User Interface program\n";

    }

    }

  2. #2
    Join Date
    Jul 2012
    Posts
    90

    Re: Need help with C# code; am getting errors

    Your friend is correct. The listing you have is C++ not C#.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center