小编Sid*_*qui的帖子

在窗口平台下,在c ++中睡眠线程为100.8564毫秒

我有任何方法在窗口OS下睡眠线程达到100.8564毫秒.我正在使用多媒体计时器,但其分辨率至少为1秒.请指导我,以便我可以处理毫秒的小数部分.

c c++ windows

1
推荐指数
1
解决办法
325
查看次数

Linux或Mac中的Microsoft.Net中间代码

我在c#.Net工作.有没有办法使.Net应用程序平台独立?这样我就可以将它运行到任何操作系统.请给我一些指导.提前致谢.

.net c# ado.net c#-3.0

0
推荐指数
1
解决办法
113
查看次数

C中的并行线程

我的应用程序中有两个线程.是否可以同时执行两个线程而不会休眠任何线程?

c parallel-processing

0
推荐指数
1
解决办法
7343
查看次数

c ++中的文件阅读问题

我有以下程序,

int iIndex=0;
char cPort[5]={"\0"};
char cFileChar;
fopen_s(&fFile,"c:\\Config\\FileName.txt","r");
if(fFile !=0)
{
  cFileChar = getc(fFile);
  while (cFileChar!= EOF)
  {
    cPort[iIndex]=cFileChar;
    iIndex++;
    cFileChar = getc(fFile);
  }
iDIPort=atoi(cPort);
}
Run Code Online (Sandbox Code Playgroud)

在我有32000的文件中,但是当程序执行并从文件中读取时,其读取正常并将iDIPort设置为32000但有时它将变量值设置为320000.

请帮我解决这个问题.

c c++ windows

0
推荐指数
1
解决办法
120
查看次数

数据包在窗口OS下嗅探

我想在没有wincap库的情况下嗅探网络数据包,请给我一些提示或方向,以便我能够实现.

c windows network-programming

0
推荐指数
1
解决办法
443
查看次数

C++指针混乱

请解释以下代码

#include <iostream>

using namespace std;

int main()
{
    const int x = 10;
    int * ptr;
    ptr = (int *)( &x );    //make the pointer to constant int*
    *ptr = 8;               //change the value of the constant using the pointer.
    //here is the real surprising part
    cout<<"x: "<<x<<endl;          //prints 10, means value is not changed
    cout<<"*ptr: "<<*ptr<<endl;    //prints 8, means value is changed
    cout<<"ptr: "<<(int)ptr<<endl; //prints some address lets say 0xfadc02
    cout<<"&x: "<<(int)&x<<endl;   //prints the same address, i.e. 0xfadc02 …
Run Code Online (Sandbox Code Playgroud)

c++

0
推荐指数
2
解决办法
139
查看次数