Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //HELLO WOLRDING
- #include "main.h"
- #include <QtCore>
- #include "iostream"
- #include"fstream"
- #include "vector"
- //#include <QtCore/QCoreApplication>
- #include <QDebug>
- int wall::total = 0;
- wall::wall(){
- total++;
- x = 50;
- y = 60;
- xy = x+y;
- stringy = "[eq";
- }
- wall::~wall(){
- total--;
- }
- void Lession01(){
- int sz = 5000000 ;
- qint64 tsz = 0;
- house* I = new house[sz];
- qDebug()<<"objects count"<< I->total;
- qDebug()<<"size of 1 object"<< sizeof(house);
- for (int i = 0 ; i < sz ; i++){
- tsz+=sizeof(I);
- }
- qDebug()<<"fullsize equals to:" << tsz << "bytes" << (tsz/1024.00)<< "KiB" << ((tsz/1024.00)/1024.00) << "MiB";
- }
- void Lession02(){
- using namespace std;
- vector<string> str;
- ifstream in("1.txt");
- string stri;
- while(in>>stri){
- str.push_back(stri);
- }
- for (int i = 0; i<str.size();i++){
- qDebug()<<QString::fromStdString(str[i]);
- }
- }
- void Lession03(){
- }
- int main(int argc, char *argv[])
- {
- QCoreApplication a(argc, argv);
- //Lession01;
- Lession02();
- //Lession03;
- return a.exec();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement