#include <iostream>
#include <fstream>
#include <string>
#include <vector>
int pos;
struct Customer
{
int customerID;
std::string salutation;
std::string dateOfBirth;
std::string state;
std::string creationDate;
};
struct Item
{
int itemID;
std::string size;
std::string color;
int manufacturerID;
double price;
};
struct Order
{
int orderItemID;
std::string orderDate;
std::string deliveryDate;
Customer *customer;
Item *item;
};
std::string SubStr(std::string str)
{
int i = pos;
std::string substr = "";
while (str[i] != ';' && str[i]!='\0' && str[i]!=EOF)
{
substr += str[i++];
pos++;
}
pos++;
return substr;
}
int main()
{
std::string str;
std::ifstream file("C:\\Users\\User\\Desktop\\инт сис\\04\\orders_class.txt", std::ios::in);
std::vector<Order*>*vec = new std::vector<Order*>();
int strstr = 0;
while (!file.eof())
{
//if (strstr == 50078)
// bool b = true;
pos = 0;
getline(file, str);
if(!strstr)
getline(file, str);
//std::cout << str << std::endl;
if (str != "")
{
vec->push_back(new Order());
(*vec)[vec->size() - 1]->item = new Item();
(*vec)[vec->size() - 1]->customer = new Customer();
(*vec)[vec->size() - 1]->orderItemID = stoi(SubStr(str));
(*vec)[vec->size() - 1]->orderDate = SubStr(str);
(*vec)[vec->size() - 1]->deliveryDate = SubStr(str);
(*vec)[vec->size() - 1]->item->itemID = stoi(SubStr(str));
(*vec)[vec->size() - 1]->item->size = SubStr(str);
(*vec)[vec->size() - 1]->item->color = SubStr(str);
(*vec)[vec->size() - 1]->item->manufacturerID = stoi(SubStr(str));
std::string::size_type sz;
(*vec)[vec->size() - 1]->item->price = std::stod(SubStr(str), &sz);
(*vec)[vec->size() - 1]->customer->customerID = stoi(SubStr(str));
(*vec)[vec->size() - 1]->customer->salutation = SubStr(str);
(*vec)[vec->size() - 1]->customer->dateOfBirth = SubStr(str);
(*vec)[vec->size() - 1]->customer->state = SubStr(str);
(*vec)[vec->size() - 1]->customer->creationDate = SubStr(str);
}
strstr++;
//std::cout << strstr << std::endl;
}
file.close();
system("pause");
return 0;
}
void__ Scene2::LoadImage(const ILstring path)
{
ILenum ext;
if(strstr(path,"png"))
{
ext=IL_PNG;
}
if(strstr(path,"jpg") || strstr(path,"jpeg"))
{
ext=IL_JPG;
}
if(strstr(path,"bmp"))
{
ext=IL_BMP;
}
}
for(float__ i=54;i<960*495;i++)
{
int__ index=i*4;
uchar__ R,G,B,A;
R=NewData[index]; //R
A=NewData[index+1];//Green(B) //G
B=NewData[index+2];//Red(G) //A
G=NewData[index+3];//blue(R) //B
NewData[index]=R;
NewData[index+1]=G;//(G)
NewData[index+2]=B;//(B)
NewData[index+3]=A;//(R)
//GBR
//BGsR
}
<script>
var c2=[],c3=[],c4=[],c5=[];
alert(new Date());
c2[0] = 0.4829629131445341;
c2[1] = 0.8365163037378077;
c2[2] = 0.2241438680420134;
c2[3] = -0.1294095225512603;
c3[0] = 0.3326705529500825;
c3[1] = 0.8068915093110924;
c3[2] = 0.4598775021184914;
c3[3] = -0.1350110200102546;
c3[4] = -0.0854412738820267;
c3[5] = 0.0352262918857095;
c4[0] = 0.2303778133088964;
c4[1] = 0.7148465705529154;
c4[2] = 0.6308807679398587;
c4[3] = -0.0279837694168599;
c4[4] = -0.1870348117190931;
c4[5] = 0.0308413818355607;
c4[6] = 0.0328830116668852;
c4[7] = -0.0105974017850690;
c5[0] = 0.1601023979741929;
c5[1] = 0.6038292697971895;
c5[2] = 0.7243085284377726;
c5[3] = 0.1384281459013203;
c5[4] = -0.2422948870663823;
c5[5] = -0.0322448695846381;
c5[6] = 0.0775714938400459;
c5[7] = -0.0062414902127983;
c5[8] = -0.0125807519990820;
c5[9] = 0.0033357252854738;
var sum=0,sum2=0;
for(var j=0;j<c2.length;j++)
{
sum+=c2[j]*Math.sqrt(2);
for(var m=Math.round(-(c2.length-1)/2);m<(c2.length-1)/2,j+2*m<c2.length;m++)
{
if(j+2*m>=0)
{
sum2+=2*c2[j]*c2[j+2*m];
document.write("Value c2:"+(j+2*m)+ "<br>");
}
}
document.write("Value c2 coeff:"+c2[j]+ "<br>");
}
document.write("Value c2 coeff sum:"+sum+ "<br>");
document.write("Value c2 coeff sum2:"+sum2+ "<br>");
sum=0,sum2=0;;
for(var j=0;j<c3.length;j++)
{
sum+=c3[j]*Math.sqrt(2);
document.write("Value c3 coeff:"+c3[j]+ "<br>");
for(var m=Math.round(-(c3.length-1)/2);m<(c3.length-1)/2,j+2*m<c3.length;m++)
{
if(j+2*m>=0)
{
sum2+=2*c3[j]*c3[j+2*m];
document.write("Value c3:"+(j+2*m)+ "<br>");
}
}
}
document.write("Value c3 coeff sum:"+sum+ "<br>");
document.write("Value c3 coeff sum2:"+sum2+ "<br>");
sum=0,sum2=0;
for(var j=0;j<c4.length;j++)
{
sum+=c4[j]*Math.sqrt(2);
document.write("Value c4 coeff:"+c4[j]+ "<br>");
for(var m=Math.round(-(c4.length-1)/2);m<(c4.length-1)/2,j+2*m<c4.length;m++)
{
if(j+2*m>=0)
{
sum2+=2*c4[j]*c4[j+2*m];
document.write("Value c4:"+(j+2*m)+ "<br>");
}
}
}
document.write("Value c4 coeff sum:"+sum+ "<br>");
document.write("Value c4 coeff sum2:"+sum2+ "<br>");
sum=0,sum2=0;;
for(var j=0;j<c5.length;j++)
{
sum+=c5[j]*Math.sqrt(2);
document.write("Value c5 coeff:"+c5[j]+ "<br>");
for(var m=Math.round(-(c5.length-1)/2);m<(c5.length-1)/2,j+2*m<c5.length;m++)
{
if(j+2*m>=0)
{
sum2+=2*c5[j]*c5[j+2*m];
document.write("Value c5:"+(j+2*m)+ "<br>");
}
}
}
document.write("Value c5 coeff sum:"+sum+ "<br>");
document.write("Value c5 coeff sum2:"+sum2+ "<br>");
console.log("echo");
</script>