I’m a high school student and my teacher recently gave us a piece of homework, he said we can make basically any type of project until the end of the semester. I’m currently working on making ultimate tic tac toe, but before the board itself appears, I want to put up a few flags as ..

Read more

I’m having problems when trying to run threads with class methods. Ex: #include "p2p/p2pServer.h" #include <stdio.h> #include <stdlib.h> #include <thread> int main() { p2pServer server; std::thread listener(server.listenPeers()); std::thread connector(server.connectPeers()); listener.join(); connector.join(); } p2pServer is a class that has two functions: listenPeers and connectPeers, twice are int functions. My objective is to run that two functions ..

Read more

I am currently attempting to rebuild and update a Project written in Rust (more specifically it’s an SKSE64 plugin for Skyrim: https://github.com/lukasaldersley/sse-mod-skyrim-search-se forked from qbx2) The last problem I’m facing is the library now requires a struct to be exported from our library for version checking. I have attempted many probably stupid ways to implement ..

Read more

I’m trying to run openrgb [0] as root to be able to detect usb devices, as README says. And I see following error: $ sudo QT_DEBUG_PLUGINS=1 ./openrgb … QFactoryLoader::QFactoryLoader() checking directory path "/home/paskripkin/Documents/git/OpenRGB/platforms" … loaded library "/usr/lib64/qt5/plugins/platforms/libqxcb.so" qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application ..

Read more

Consider: [1] int *func(){ int a[10]; //… return a; } int main(){ int* a = func(); } //在函数里开数组后往main函数回传指针 [2] void func(int a*){ //… } int main(){ int a[10]; func(a); } //在main函数开个数组后传实参到函数里 Two programs can define an array a and use it. Which one is better? Why?在内存分配和性能上有啥区别?更推荐哪种方式? Source: Windows Que..

Read more