49 |
|
// |
50 |
|
// Contactor.cpp |
51 |
|
|
52 |
– |
#include "conio.h" |
52 |
|
#include "Contactor.h" |
53 |
|
|
54 |
+ |
#ifdef _WIN32 |
55 |
+ |
#include "conio.h" |
56 |
+ |
#else |
57 |
+ |
#include <pwd.h> |
58 |
+ |
#include <unistd.h> |
59 |
+ |
#endif |
60 |
+ |
|
61 |
|
Contactor::Contactor() |
62 |
|
{ |
63 |
|
loadAccount(); |
195 |
|
account.setEmail(email); |
196 |
|
delete [] email; |
197 |
|
|
198 |
+ |
#ifdef _WIN32 |
199 |
|
cout << "Password: " << flush; |
200 |
|
|
201 |
|
string password; |
225 |
|
} |
226 |
|
} |
227 |
|
while (letter != '\r' && letter != '\n'); |
228 |
+ |
#else |
229 |
+ |
string password = getpass("Password: "); |
230 |
+ |
#endif |
231 |
|
|
232 |
|
account.setPassword(password); |
233 |
|
|
286 |
|
|
287 |
|
if (account.getPassword() == "") |
288 |
|
{ |
289 |
+ |
#ifdef _WIN32 |
290 |
|
cout << "Password: " << flush; |
291 |
|
|
292 |
|
string password; |
316 |
|
} |
317 |
|
} |
318 |
|
while (letter != '\r' && letter != '\n'); |
319 |
+ |
#else |
320 |
+ |
string password = getpass("Password: "); |
321 |
+ |
#endif |
322 |
|
|
323 |
|
account.setPassword(password); |
324 |
|
} |