Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > =?windows-1252?...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 45798 of 45898
Post > Topic >>

=?windows-1252?B?ZXJyb3I6IG5vIG1hdGNoIGZvciCRb3BlcmF0b3I8PJIgaW4gkXN0ZDo6Y291dA==?=

by curiousEngine <curious.engine@[EMAIL PROTECTED] > May 7, 2008 at 10:54 AM

Is the problem with the 2 functions?? G++ gives such type of error.

#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;
	}


	return 0;
}




 4 Posts in Topic:
=?windows-1252?B?ZXJyb3I6IG5vIG1hdGNoIGZvciCRb3BlcmF0b3I8PJIgaW4
curiousEngine <curious  2008-05-07 10:54:57 
Re: error: no match for =?windows-1252?Q?=91operator=3C=3C=92_?=
"Alf P. Steinbach&qu  2008-05-07 20:06:51 
Re: error: no match for 'operator<<' in 'std::cout.std::basic_os
"Victor Bazarov"  2008-05-07 14:17:38 
=?windows-1252?B?UmU6IGVycm9yOiBubyBtYXRjaCBmb3IgkW9wZXJhdG9yPDy
James Kanze <james.kan  2008-05-09 02:34:43 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu May 15 0:43:59 CDT 2008.