-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparole.cpp
More file actions
44 lines (34 loc) · 709 Bytes
/
parole.cpp
File metadata and controls
44 lines (34 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include "parole.h"
PAROLE::PAROLE()
{ parola="";
descrizione="";
}
void PAROLE::UP_P(string s)
{ unsigned int i=0;
parola=s;
parola[i]=toupper(parola[i]);
for (i=1;i<parola.length();i++)
parola[i]=tolower(parola[i]);
}
void PAROLE::UP_D(string s)
{
unsigned int i=0;
descrizione=s;
descrizione[i]=toupper(descrizione[i]);
for (i=1;i<descrizione.length();i++)
descrizione[i]=tolower(descrizione[i]);
}
string PAROLE::getP()
{ return parola;}
string PAROLE::getD()
{return descrizione;}
string PAROLE::set(string s)
{
unsigned int i=0;
s[i]=toupper(s[i]);
for(i=1;i<s.length();i++)
s[i]=tolower(s[i]);
return s;
}
PAROLE::~PAROLE()
{}