上一页 1 ··· 80 81 82 83 84 85 86 87 88 ··· 120 下一页
摘要: void Util::getArray23(int *arr, int len) { srand(time(NULL)); for (int i = 0; i < len; i++) { arr[i] = rand(); } } void Util::printArray24(int *arr, i 阅读全文
posted @ 2022-03-19 19:14 FredGrit 阅读(43) 评论(0) 推荐(0)
摘要: void Util::logFile21(string fileName) { fstream wFile(fileName, ios::app); if (!wFile.is_open()) { cout << "Create or open " << fileName << " failed!" 阅读全文
posted @ 2022-03-19 18:04 FredGrit 阅读(46) 评论(0) 推荐(0)
摘要: void Util::getStructVector(vector<BookStruct> &vec, int len) { for (int i = 0; i < len; i++) { BookStruct bs; bs.BookIndex = i; bs.BookId = (unsigned 阅读全文
posted @ 2022-03-19 17:37 FredGrit 阅读(44) 评论(0) 推荐(0)
摘要: void Util::getArray23(int *arr, int len) { srand(time(NULL)); for (int i = 0; i < len; i++) { arr[i] = rand(); } } void Util::printArray24(int *arr, i 阅读全文
posted @ 2022-03-19 17:05 FredGrit 阅读(23) 评论(0) 推荐(0)
摘要: void Util::threadLambda170(int x, int y) { thread t1([](int x, int y) { auto result=pow(x,y); cout<<fixed<<"Pow="<<result<<endl; }, x, y); t1.join(); 阅读全文
posted @ 2022-03-16 13:23 FredGrit 阅读(50) 评论(0) 推荐(0)
摘要: int Util::partition9(int *arr, int low, int high) { int pivot = *(arr + high); int i = low - 1; for (int j = low; j < high; j++) { if (arr[j] < pivot) 阅读全文
posted @ 2022-02-27 14:15 FredGrit 阅读(64) 评论(0) 推荐(0)
摘要: void Util::getArray(int *arr,int len) { srand(time(NULL)); for(int i=0;i<len;i++) { *(arr+i)=rand(); } } void Util::printArray(int *arr,int len) { for 阅读全文
posted @ 2022-02-27 13:45 FredGrit 阅读(36) 评论(0) 推荐(0)
摘要: //Node.cpp #include <iostream> using namespace std; template<typename T> class Node { public: T Val; Node<T> *Next; Node(T value):Val(value){}; }; //h 阅读全文
posted @ 2022-02-07 23:07 FredGrit 阅读(73) 评论(0) 推荐(0)
摘要: // The MIT License (MIT) // Copyright (c) 2022 SmoothTech // Permission is hereby granted, free of charge, to any person obtaining a // copy of this s 阅读全文
posted @ 2022-02-07 18:23 FredGrit 阅读(34) 评论(0) 推荐(0)
摘要: #include <iostream> #include <iterator> using namespace std; void arrayPointer3(); int main() { arrayPointer3(); return 0; } void arrayPointer3() { in 阅读全文
posted @ 2022-02-07 17:44 FredGrit 阅读(29) 评论(0) 推荐(0)
上一页 1 ··· 80 81 82 83 84 85 86 87 88 ··· 120 下一页