搜索资源列表
Pthread-of-linux
- 在linux环境下编写一个控制台应用程序,程序中有一个共享的整型变量shared_var,初始值为0;创建一个线程并使其立即与主线程并发执行。新创建的线程与主线程均不断地循环,并输出shared_var 的值。主线程在循环中不断地对shared_var 进行加1操作,即每次循环shared_var 被加1;而新创建的线程则不断地对shared_var 进行减1 操作,即每次循环shared_var 被减1。观察程序运行的结果,并对你看到的现象进行解释。-Written in the linux
sort.cpp
- 写一个函数,输入参数有四个,分别是map<string,float>型数据,整数,float型数组,string型数组。返回结果,将map中的数据按float值进行排序,并将排序后的结果保存到float、string两个数组中,两个数组元素必须对应于map数据。-Write a function, there are four input parameters, are the map <string,float> data, integer, float array,
delete_repeated_char
- 本代码可以计算出给定的一个整数的二进制形式中的1的个数,代码设计严密无bug-This code can be calculated given the number of a binary form of an integer, no strict code design bug
abc
- a program that creates three threads. These threads access a shared integer, called buer, one at a time. The buer will initially be set to 0. Each thread should print its thread ID, process ID and the buer s current value in one statement, t