* curiousEngine:
> Is the problem with the 2 functions?? G++ gives such type of error.
Don't put your question only in subject line.
Don't put critical information in the subject line.
> #include <iostream>
> using namespace std;
>
> int i, j;
> int myarr[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9}, arr1[10] = {11, 12, 13,
> 14, 15, 16, 17, 18, 19, 20};
>
> void dispMyarr(int l){
> if ((myarr[l] % 3) ==0)
> cout<<myarr[l];
> else
> cout<<"-";
> }
>
> void dispArr1(int l){
> if((arr1[l] % 3) == 0)
> cout<<arr1[l];
> else
> cout<<"-";
> }
> int main(int argc, char** argv)
> {
> for(int k = 0 ; k < 10; k++){
> cout<<k<<dispMyarr(k)<<dispArr1(k)<<endl;
dispArray is a function returning void.
> }
>
>
> return 0;
> }
Cheers, & hth.,
- Alf
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?


|