[algogeeks] error in c++ program

2011-09-22 Thread Rajesh Kumar
how we can remove error ? #include using namespace std; class time { int m; int h; public: void set(int,int); void sum(time,time,time); void display(); }; void time::set(int x,int y) { m=x; h=y; } void time::sum(time t1,time t2,time t3) { m=t1.m+t2.m+t3.m; h=t1.h+t2.h+t3.h; } void time::display(voi

[algogeeks] Error in String Program

2011-09-01 Thread sravan kumar
Please can anybody tell me why nothing is printed Here is my code. #include #include #include #include #include using namespace std; int main() { string s,rt; cin >> s; long long int i,t = s.size();int c=0,sum=0; for ( i = 0; i < t; i++ ) { sum = (c+s[i]-'0')

Re: [algogeeks] Error in code?plz help...

2011-08-06 Thread Ram Chauhan
Lvalue assigment error. On Sat, Aug 6, 2011 at 4:05 PM, Rajesh Kumar wrote: > How to remove error in this code? > > #include > main() > { > int i=10,j=15; > if(i%2=j%3) > printf("\ncharacter"); > } > > -- > Regards > Rajesh Kumar > > > -- > You received this message because you are subscribed to

Re: [algogeeks] Error in code?plz help...

2011-08-06 Thread Pisit Makpaisit
Use == for comparison not = On 6 Aug 2011 17:35, "Rajesh Kumar" wrote: > > How to remove error in this code? > > #include > main() > { > int i=10,j=15; > if(i%2=j%3) > printf("\ncharacter"); > } > > -- > Regards > Rajesh Kumar > > > -- > You received this message because you are subscribed to the

Re: [algogeeks] Error in code?plz help...

2011-08-06 Thread siddharam suresh
Thank you, Siddharam On Sat, Aug 6, 2011 at 4:05 PM, Rajesh Kumar wrote: > How to remove error in this code? > > #include > main() > { > int i=10,j=15; > if(i=j%3) > printf("\ncharacter"); > } > > -- > Regards > Rajesh Kumar > > > -- > You received this message because you are subscribed to the

[algogeeks] Error in code?plz help...

2011-08-06 Thread Rajesh Kumar
How to remove error in this code? #include main() { int i=10,j=15; if(i%2=j%3) printf("\ncharacter"); } -- Regards Rajesh Kumar -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com

Re: [algogeeks] Error

2011-05-16 Thread rahul
it happens, v learn by making mistakes... keep coding. On Tue, May 17, 2011 at 9:35 AM, Akshata Sharma wrote: > ya.. sorry my mistake! > > > On Tue, May 17, 2011 at 9:31 AM, rahul wrote: > >> pop op doesn't return anything...use top.something like that op. >> >> Rahul. >> >> On Tue, May 17,

Re: [algogeeks] Error

2011-05-16 Thread Akshata Sharma
ya.. sorry my mistake! On Tue, May 17, 2011 at 9:31 AM, rahul wrote: > pop op doesn't return anything...use top.something like that op. > > Rahul. > > On Tue, May 17, 2011 at 9:29 AM, Akshata Sharma > wrote: > >> can someone please tell me why I am getting this error? >> >> #include >> #include

Re: [algogeeks] Error

2011-05-16 Thread rahul
pop op doesn't return anything...use top.something like that op. Rahul. On Tue, May 17, 2011 at 9:29 AM, Akshata Sharma wrote: > can someone please tell me why I am getting this error? > > #include > #include > #include > > using namespace std; > > int main() > { > stack > stk; > stk.push(make

[algogeeks] Error

2011-05-16 Thread Akshata Sharma
can someone please tell me why I am getting this error? #include #include #include using namespace std; int main() { stack > stk; stk.push(make_pair(2,1)); stk.push(make_pair(3,2)); pair p = stk.pop(); //at this line I am getting error "conversion from `void' to non-scalar type `std::pair'

[algogeeks] error in code

2011-01-05 Thread monty 1987
Hi , i m getting error can u find the error in code for following problem?? We will use the following (standard) definitions from graph theory. Let V be a nonempty and finite set, its elements being called vertices (or nodes). Let E be a subset of the Cartesian product V×V, its elements being c