Activity Stream
48,167 MEMBERS
6917 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 6 of 6
  1.     
    #1
    Member

    Default compiling a program

    I am learning c++ in my college. they we use turbo c++ for compiling but turbo c++ doesn't works on my computer because of winodws 7.

    i tried to compile this program in visual c++ 2005 express edition but i failed. Please help me out...

    #include <iostream.h>
    #include <conio.h>
    void main()
    {
    int n,i;
    float a[100];
    cout<<"How Many Elements You Want To Input";
    cin>>n;
    cout<<"\nEnter The elements of array\n";
    for (i=0; i<=n; i++)
    {
    cin>>a[i];
    }
    cout<<"\nThe Array Given by you is\n";
    for (i=o; i<n; i++)
    {
    cout<<a[i];
    }
    getch();
    }
    DigitalLover Reviewed by DigitalLover on . compiling a program I am learning c++ in my college. they we use turbo c++ for compiling but turbo c++ doesn't works on my computer because of winodws 7. i tried to compile this program in visual c++ 2005 express edition but i failed. Please help me out... Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    PasteBot.appspot.com
    Have you Installed VC++ in the Default Directory ?
    If yes then follow the below steps

    Copy the Program to to C:\Program Files\Microsoft Visual Studio "w/e version u are using"\VC

    Open the Visual Studio Command Prompt from start Menu

    Type "cl <name of file with extension>" without the Quotes
    e.g. If I have a C++ file with the name helloWorld.cc
    Type "cl HelloWorld.cc" without the Quotes
    You will get an executable file with the same name in the Folder. Just run it.


    PS : Since you are trying out such Simple Programs. Just use
    Code: 
    http://codepad.org/
    .
    .
    .

  4.     
    #3
    Member
    Website's:
    sborg.us
    Try Bloodshed Dev C++

    And codepad = win!

  5.     
    #4
    Member
    Change the o in your second for loop to 0

  6.     
    #5
    Member
    Code: 
    #include <iostream.h>
    #include <conio.h>
    void main()
    { 
        int n,i;
        float a[100];
        cout<<"How Many Elements You Want To Input";
        cin>>n;
        cout<<"\nEnter The elements of array\n";
        for (i=0; i<n; i++)
        {
            cin>>a[i];
        }
        cout<<"\nThe Array Given by you is\n";
        for (i=0; i<n; i++)
        {
            cout<<a[i];
        }
    getch();
    }
    This should work for you, Turbo C++ works in Win 7 32 bit. You can also try for codeblocks.

  7.     
    #6
    Member
    ok i will try that

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Compiling mysqli for php 5.2 windows errors in VC6
    By NewEraCracker in forum Web Development Area
    Replies: 1
    Last Post: 17th Feb 2011, 02:39 PM
  2. Replies: 0
    Last Post: 9th Feb 2011, 04:29 PM
  3. How to: Compiling PHP and Apache - cPanel
    By NationWebHost in forum Technical and Security Tutorials
    Replies: 5
    Last Post: 29th Nov 2010, 06:38 PM
  4. Need some invoice program source code/or program only
    By Nikolasr in forum Webmaster Discussion
    Replies: 2
    Last Post: 1st Feb 2010, 10:55 AM
  5. Compiling gif2apng on debian
    By SplitIce in forum Tutorials and Guides
    Replies: 7
    Last Post: 29th Jan 2010, 12:37 PM

Tags for this Thread

BE SOCIAL