Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: What to do...

  1. #1
    New Coder
    Join Date
    Nov 2011
    Location
    Pakistan
    Posts
    16
    Thanks
    3
    Thanked 0 Times in 0 Posts

    What to do...

    i m using window7 on amd 6400+. i installed Dev c++ compiler, but its not working. can somebody suggest the solution......

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,280
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Quote Originally Posted by Adeel.Rekhi View Post
    i m using window7 on amd 6400+. i installed Dev c++ compiler, but its not working. can somebody suggest the solution......

    My suggested solution would be: make it work.

    Unless you can elaborate on what "not working" means that's the best answer you are going to get.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • Users who have thanked Spookster for this post:

    Adeel.Rekhi (01-10-2012)

  • #3
    New Coder
    Join Date
    Nov 2011
    Location
    Pakistan
    Posts
    16
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I mean is there any machine issue or some setting of compiler....?

  • #4
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,280
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Quote Originally Posted by Adeel.Rekhi View Post
    I mean is there any machine issue or some setting of compiler....?

    That still doesn't tell us what the problem is. Does Dev C++ not install correctly? Does it not open? Does it not compile your code or is compiling and just not linking? Error messages? You haven't told us what the issue is other than "it's not working".
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #5
    New Coder
    Join Date
    Nov 2011
    Location
    Pakistan
    Posts
    16
    Thanks
    3
    Thanked 0 Times in 0 Posts
    #include<iostream.h>

    void chk(int);
    int main()
    {

    int a[5];
    for(int i=0;i<=4;i++)
    {
    cout<<"enter the numbers"
    <<endl;
    cin>>a[i];
    }
    chk(a);

    return 0;
    }
    void chk(int m[])
    for(int j=0;j<=4;j++)
    {
    cout<<"number"<<j+1<<"is"<<m[j]
    <<endl;
    }
    This is my coding and error is
    G:\My practice\Untitled1.cpp In function `int main()':
    14 G:\My practice\Untitled1.cpp invalid conversion from `int*' to `int'
    14 G:\My practice\Untitled1.cpp initializing argument 1 of `void chk(int)'
    14 G:\My practice\Untitled1.cpp At global scope:
    19 G:\My practice\Untitled1.cpp expected init-declarator before "for"
    19 G:\My practice\Untitled1.cpp expected `,' or `;' before "for"
    19 G:\My practice\Untitled1.cpp expected constructor, destructor, or type conversion before '<=' token
    19 G:\My practice\Untitled1.cpp expected `,' or `;' before '<=' token
    19 G:\My practice\Untitled1.cpp expected constructor, destructor, or type conversion before '++' token
    19 G:\My practice\Untitled1.cpp expected `,' or `;' before '++' token

  • #6
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Your prototype is:
    Code:
    void chk(int);
    But your definition has a different parameter type. You need to change it to:
    Code:
    void chk(int[]);
    You are also missing the curly braces for the chk function.
    OracleGuy

  • Users who have thanked oracleguy for this post:

    Adeel.Rekhi (01-10-2012)

  • #7
    New Coder
    Join Date
    Nov 2011
    Location
    Pakistan
    Posts
    16
    Thanks
    3
    Thanked 0 Times in 0 Posts
    i got it. Thanks.
    but it does not wait after printing values and be terminated


  •  

    Posting Permissions

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