Click here to Skip to main content
15,889,877 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRestrict Copy and Paste Pin
john563229-Apr-12 18:35
john563229-Apr-12 18:35 
AnswerRe: Restrict Copy and Paste Pin
_AnsHUMAN_ 29-Apr-12 22:29
_AnsHUMAN_ 29-Apr-12 22:29 
AnswerRe: Restrict Copy and Paste Pin
JohnCz2-May-12 11:09
JohnCz2-May-12 11:09 
QuestionHow to setup the project settings when create an x64 project in cs2008? Pin
SAMZCN29-Apr-12 17:27
SAMZCN29-Apr-12 17:27 
AnswerRe: How to setup the project settings when create an x64 project in cs2008? Pin
Lakamraju Raghuram29-Apr-12 17:56
Lakamraju Raghuram29-Apr-12 17:56 
GeneralRe: How to setup the project settings when create an x64 project in cs2008? Pin
SAMZCN30-Apr-12 1:06
SAMZCN30-Apr-12 1:06 
GeneralRe: How to setup the project settings when create an x64 project in cs2008? Pin
Randor 30-Apr-12 2:42
professional Randor 30-Apr-12 2:42 
Questionrelational operators in class time Pin
MMJ198929-Apr-12 14:28
MMJ198929-Apr-12 14:28 
hello hello hello

simply i have this code . and i need help to modify or change >= operators in class .

C++
#include <iostream> 
using namespace std ; 

class time 
{ 
   private : 
	   int hour ; 
	   int minute ; 
	   int second ; 
   public : 
	   time () 
	   {} 
	   time (int h , int m , int s ) : hour ( h) , minute (m) , second(s) 
	   {} 
	   void get () 
	   { 
		   cin >> hour >> minute >> second ; 
	   } 
	   void show () 
	   { 
		   cout << hour << " : " << minute << " : " << second << endl  ; 
	   } 

	   bool operator >= ( time r ) 
	   { 
		   if ( hour >= r.hour  ) 
			   {
				  if ( hour > r.hour ) 
				  { 
					  return true ; 
				  }
				  else 
				  {
					  if ( minute >= r.minute ) 
					  {
						  if ( second >= r.second ) 
							  return true ; 
							else 
								return false ; 
					  } else { 
						  return false ; 
					  }
				  }
				   
			   }  
		   else 
			   return false ; 
	   } 
}; 

int main () 
{ 
	time a, b ; 
	a.get() ; 
	b.get() ; 

	a.show() ; 
	b.show () ; 

	if ( a >= b ) 
		cout << "true  \n" ; 
	else 
		cout << "not true \n" ; 

	return 0 ; 
} 

QuestionRe: relational operators in class time Pin
Lakamraju Raghuram29-Apr-12 17:57
Lakamraju Raghuram29-Apr-12 17:57 
QuestionAsyncIO - how to use it? Pin
TalSt29-Apr-12 1:47
TalSt29-Apr-12 1:47 
AnswerRe: AsyncIO - how to use it? Pin
Aescleal29-Apr-12 3:22
Aescleal29-Apr-12 3:22 
QuestionEXE File Protection Pin
Le Quang Long27-Apr-12 21:22
Le Quang Long27-Apr-12 21:22 
AnswerRe: EXE File Protection Pin
Rajesh R Subramanian27-Apr-12 21:31
professionalRajesh R Subramanian27-Apr-12 21:31 
GeneralRe: EXE File Protection Pin
Le Quang Long28-Apr-12 0:12
Le Quang Long28-Apr-12 0:12 
GeneralRe: EXE File Protection Pin
Rajesh R Subramanian28-Apr-12 0:57
professionalRajesh R Subramanian28-Apr-12 0:57 
GeneralRe: EXE File Protection Pin
Le Quang Long28-Apr-12 16:19
Le Quang Long28-Apr-12 16:19 
Questionhow to make this not stop? Pin
Member 784572027-Apr-12 14:17
Member 784572027-Apr-12 14:17 
AnswerRe: how to make this not stop? Pin
krsmichael27-Apr-12 14:45
krsmichael27-Apr-12 14:45 
GeneralRe: how to make this not stop? Pin
Member 784572027-Apr-12 15:07
Member 784572027-Apr-12 15:07 
GeneralRe: how to make this not stop? Pin
krsmichael27-Apr-12 18:33
krsmichael27-Apr-12 18:33 
GeneralRe: how to make this not stop? Pin
Member 784572027-Apr-12 21:20
Member 784572027-Apr-12 21:20 
AnswerRe: how to make this not stop? Pin
Stephen Hewitt27-Apr-12 20:05
Stephen Hewitt27-Apr-12 20:05 
AnswerRe: how to make this not stop? Pin
Emilio Garavaglia29-Apr-12 10:44
Emilio Garavaglia29-Apr-12 10:44 
QuestionProtect the running process - searching an old artical Pin
waqarazeem26-Apr-12 23:47
waqarazeem26-Apr-12 23:47 
AnswerRe: Protect the running process - searching an old artical Pin
«_Superman_»27-Apr-12 0:25
professional«_Superman_»27-Apr-12 0:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.