简体   繁体   中英

Passing by reference using CreateThread()

I know the general gist of how to launch a thread using CreateThread() in C++, and have created an application that successfully launches them. I know that if I were to use C11 threads pass by reference isn't a problem, but I am wondering how/if this is possible using CreateThread(), or any earlier (non C-11) threading mechanisms.

If you look, you can certainly find some C++ thread APIs that are older than those in C++11 (eg, MFC and Qt both support threading). If memory serves, they use references in places, but unless you're using them for the rest of your application, you probably don't care much about them.

The "raw" APIs (POSIX, Win32, etc.) are generally based strictly on C. They don't use of include anything (including references) that isn't found in C.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM