...

View Full Version : What to do...



Adeel.Rekhi
01-04-2012, 06:48 PM
i m using window7 on amd 6400+. i installed Dev c++ compiler, but its not working. can somebody suggest the solution......

Spookster
01-04-2012, 07:28 PM
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.

Adeel.Rekhi
01-05-2012, 05:05 PM
I mean is there any machine issue or some setting of compiler....?

Spookster
01-05-2012, 06:17 PM
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".

Adeel.Rekhi
01-06-2012, 03:41 PM
#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

oracleguy
01-07-2012, 06:23 AM
Your prototype is:

void chk(int);

But your definition has a different parameter type. You need to change it to:

void chk(int[]);

You are also missing the curly braces for the chk function.

Adeel.Rekhi
01-08-2012, 12:33 PM
i got it. Thanks.
but it does not wait after printing values and be terminated



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum