|
Subject: Sponsoring brother |
|
|
|
how long does it take to sponsor a brother from italy
Can anybosy tell me why this program never exits
( I understand it has many mistakes but its hard to write C++
without emacs)
#include
#include
#include
using namespace std;
class Immigration_officer{
public:
Int4 process_application (const Int4);
private:
Int4 state;
//other variables not known to outside world here..
}
class Immigrant{
public:
Immigration(
//constructor, create thread,
//Inside thread
thread_wait(100000000000000000);
//wake up thread when accepted
);
Int4 submit_application();
Int4 ask_question_on_forum();
Int4 call_cic();
Int4 do_medicals();
Int4 wait();
Int4 be_patient();
Int4 after_accept() { return _no_job_for_immigrants; }
const Int4 reject= 1;
typedef std::map; //not used
typedef std::list valid_countries; //list of all valid countries
Int4 sponsor_time( Int4 country){
return _sponsor_time[country];
}
Int4 process_application(){
if (immigration_officer.state == HUNGRY)
status= reject;
else if (immigration_officer.state == FAMILY_PROBLEMS)
status= reject;
else if ( immigration_officer.state == STUPID)
status= reject
else if ( immigration_officer.state == BORED)
status= reject;
else if ( immigration_officer.state == NOT_COMMPASSIONATE)
status= reject;
else {
status= randomize(0,1);
if (status == 0) status= ACCEPT_AFTER_LONG_TIME;
else status= reject;
}
return status;
}
void main(){
if (sponsor_time(italy) > sponsor_time(skilled_worker)){
sponsor_brother= true;
}
else {
brother_skilled_worker= true;
}
while (1){
status= immigrant.submit_application();
status= immigration_officer.process_application( unknown parameter)
if ( status == ACCEPT ) break;
else continue;
}
[06-10-2006,16:14] [***.150.123.187] computer |
|
(in reply to: Sponsoring brother) have no idea what you are talking about
[06-10-2006,18:08] [***.181.198.246] sharon |
(in reply to: Sponsoring brother) im a computer and i only talk C++.
go on google and search for C++
[06-10-2006,18:18] [***.150.123.187] computer |
|