upravy
This commit is contained in:
Binary file not shown.
@@ -9,15 +9,15 @@
|
|||||||
/// @return
|
/// @return
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
unordered_map<string, string> arguments = getArguments(argc, argv);
|
// unordered_map<string, string> arguments = getArguments(argc, argv);
|
||||||
LicenceGenerator generatorOld = LicenceGenerator(arguments["-uid"], arguments["-cid"], arguments["-csd"], arguments["-configFileName"]);
|
// LicenceGenerator generatorOld = LicenceGenerator(arguments["-uid"], arguments["-cid"], arguments["-csd"], arguments["-configFileName"]);
|
||||||
generatorOld.createLicenceFile();
|
// generatorOld.createLicenceFile();
|
||||||
return SUCCES;
|
// return SUCCES;
|
||||||
|
|
||||||
LicenceGenerator licenceGenerator = LicenceGenerator();
|
LicenceGenerator licenceGenerator = LicenceGenerator();
|
||||||
|
|
||||||
InitStructure initStructure;
|
InitStructure initStructure;
|
||||||
initStructure.elcType = 2;
|
initStructure.elcType = 1;
|
||||||
initStructure.licenceType = (int)LicenceType::EOS_EOV;
|
initStructure.licenceType = (int)LicenceType::EOS_EOV;
|
||||||
initStructure.licenceVersion = 1;
|
initStructure.licenceVersion = 1;
|
||||||
initStructure.licenceIndex = 0;
|
initStructure.licenceIndex = 0;
|
||||||
@@ -48,7 +48,7 @@ int main(int argc, char *argv[])
|
|||||||
//verze #2 : iterace pro kazdý bod zvlášť
|
//verze #2 : iterace pro kazdý bod zvlášť
|
||||||
if (licenceGenerator.initread(initStructure))
|
if (licenceGenerator.initread(initStructure))
|
||||||
{
|
{
|
||||||
int protocolId = 888;
|
int protocolId = 1;
|
||||||
|
|
||||||
LicenceItem21 info; // podle ELC a kompatibility určit strukuru (LicenceInfo11, LicenceInfo21, LicenceInfo31)
|
LicenceItem21 info; // podle ELC a kompatibility určit strukuru (LicenceInfo11, LicenceInfo21, LicenceInfo31)
|
||||||
|
|
||||||
|
|||||||
37
src/_c++notes.txt
Normal file
37
src/_c++notes.txt
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
--------------------------------------------------------------------------------------------------
|
||||||
|
It is often wise to check that a pointer argument that is supposed to point to something, actually
|
||||||
|
points to something:
|
||||||
|
int count_x(char∗ p, char x)
|
||||||
|
// count the number of occurrences of x in p[]
|
||||||
|
// p is assumed to point to a zero-ter minated array of char (or to nothing)
|
||||||
|
{
|
||||||
|
if (p==nullptr) return 0;
|
||||||
|
int count = 0;
|
||||||
|
for (; ∗p!=0; ++p)
|
||||||
|
if (∗p==x)
|
||||||
|
++count;
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
Note how we can move a pointer to point to the next element of an array using ++ and that we can
|
||||||
|
leave out the initializer in a for-statement if we don’t need it.
|
||||||
|
The definition of count_x() assumes that the char∗ is a C-style string, that is, that the pointer
|
||||||
|
points to a zero-terminated array of char.
|
||||||
|
In older code, 0 or NULL is typically used instead of nullptr (§7.2.2). However, using nullptr
|
||||||
|
eliminates potential confusion between integers (such as 0 or NULL) and pointers (such as nullptr).
|
||||||
|
--------------------------------------------------------------------------------------------------
|
||||||
|
void f(Vector v, Vector& rv, Vector∗ pv)
|
||||||
|
{
|
||||||
|
int i1 = v.sz; // access through name
|
||||||
|
int i2 = rv.sz; // access through reference
|
||||||
|
int i4 = pv−>sz; // access through pointer
|
||||||
|
}
|
||||||
|
--------------------------------------------------------------------------------------------------
|
||||||
|
class complex {
|
||||||
|
double re, im; // representation: two doubles
|
||||||
|
public:
|
||||||
|
complex(double r, double i) :re{r}, im{i} {}
|
||||||
|
............
|
||||||
|
|
||||||
|
complex a {2.3}; // construct {2.3,0.0} from 2.3
|
||||||
|
--------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -1,92 +1,3 @@
|
|||||||
10
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-79
|
|
||||||
-58
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-2
|
|
||||||
-0
|
|
||||||
-10
|
|
||||||
-0
|
|
||||||
-128
|
|
||||||
-92
|
|
||||||
-114
|
|
||||||
-101
|
|
||||||
-115
|
|
||||||
-116
|
|
||||||
-97
|
|
||||||
-114
|
|
||||||
-116
|
|
||||||
-46
|
|
||||||
-99
|
|
||||||
-122
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-116
|
|
||||||
-101
|
|
||||||
-99
|
|
||||||
-111
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-1
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-0
|
|
||||||
-1
|
|
||||||
-0
|
-0
|
||||||
-255
|
-255
|
||||||
-255
|
-255
|
||||||
|
|||||||
Reference in New Issue
Block a user