以下是二段JAVA程序: public static byte[] Key = new byte[] {
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01
};
ByteArrayOutputStream baos = new ByteArrayOutputStream(8);
DataOutputStream dos = new DataOutputStream(baos);
dos.writeInt((int)y);
dos.writeInt((int)z);请问以上程序如何移植到VC上面呢?
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01
};
ByteArrayOutputStream baos = new ByteArrayOutputStream(8);
DataOutputStream dos = new DataOutputStream(baos);
dos.writeInt((int)y);
dos.writeInt((int)z);请问以上程序如何移植到VC上面呢?
解决方案 »
- CSplitterWnd分隔条移动范围的问题!
- 如何使条形码打印注释显示而条码不显示(字符模板)
- vc6.0连接SQL Server2005怎么老是连不是上啊,都罢工了三天了,救急啊!
- 向高手请教一个菜鸟问题
- 请问创建project的时候类视图里面有个Global目录,里面有个theapp请问这个是做什么的?我是初学者,请多指教.
- dll的参数传递
- 我需要帮助关于HANDLE HWND
- 兄弟们帮忙:如何把CEdit中的文字按字符串进行处理?
- 2008到2005工程的转换问题
- 为什么连接点的Fire_xxxx函数里面,要去查询N个连接点?
- 极简单c/c++文件I/O问题,可以编译运行,请教高手内存问题
- 两个问题,10分
for(int i = 0; i < 16; i ++)
{
Key[i] = 0x01;
}
...
cout << Key[i];
第一段
public:
static byte key[]={0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01};
第二段
ByteArrayOutputStream *pBaos = new ByteArrayOutputStream(8);
DataOutputStream *pDos = new DataOutputStream(*pBaos);
pDos->writeInt((int)y);
pDos->writeInt((int)z);