我已经完成了我在网上找到的所有东西,但似乎我错过了一些非常基本的东西,花了这么多时间来解决这个问题并没有让事情变得更容易,所以我会继续在这里寻求帮助,看看是否你可以找到我做错了什么.
这是代码:
jControl.h
#ifndef _JCONTROL_H
#define _JCONTROL_H
namespace view
{
class jControl
{
public:
HWND hwnd;
HWND hParent;
HBITMAP hbitmap;
std::string text;
HFONT hFont;
COLORREF textColor;
COLORREF backgroundColor;
RECT updateRegion;
bool isUpdateRegion;
public:
jControl ( );
jControl ( HWND parent, HINSTANCE hInstance, WORD bitmap );
~jControl ( );
virtual void show ( );
virtual void hide ( );
virtual void disable ( );
virtual void enable ( );
virtual std::string getText ( );
virtual void setText ( std::string txt ); …Run Code Online (Sandbox Code Playgroud) 我正在网上学习Java的线程,我是初学者,我在理解一些概念方面遇到了困难.谁能帮我?
链接我正在学习:http://www.codeproject.com/Articles/616109/Java-Thread-Tutorial
问题:
public class Core {
public static void main(String[] args) {
Runnable r0,r1;//pointers to a thread method
r0=new FirstIteration("Danial"); //init Runnable, and pass arg to thread 1
SecondIteration si=new SecondIteration();
si.setArg("Pedram");// pass arg to thread 2
r1=si; //<~~~ What is Happening here??
Thread t0,t1;
t0=new Thread(r0);
t1=new Thread(r1);
t0.start();
t1.start();
System.out.print("Threads started with args, nothing more!\n");
}
}
Run Code Online (Sandbox Code Playgroud)
编辑:FirstIteration和SceondIteration的代码
class FirstIteration implements Runnable{
public FirstIteration(String arg){
//input arg for this class, but in fact input …Run Code Online (Sandbox Code Playgroud)