小编use*_*114的帖子

在C中读/写二进制文件

有没有人有一个可以写入二进制文件的代码示例.还有可以读取二进制文件并输出到屏幕的代码.查看示例我可以写入文件ok但是当我尝试从文件中读取时它没有正确输出.

c linux binary file-io

52
推荐指数
2
解决办法
20万
查看次数

年没有在linux上显示

希望有人能提供帮助.我正在解决某人在很久以前写的"C代码"中的一个问题,并且他已经转移了.

该段代码输出特定文件的时间戳.代码在Windows上运行时工作正常,但是当它在Linux上运行时,它会错误地显示Year.这一年没有在linux上显示,它显示35222.有没有人知道这里有什么问题?

谢谢

Windows输出:

Source file: test.dtl, Created: Mon, 27 May, 2013 at 16:13:20
Run Code Online (Sandbox Code Playgroud)

Linux输出:

Source file: test.dtl, Created: Mon, 27 May, 35222 at 16:13:20
Run Code Online (Sandbox Code Playgroud)

C代码中的函数:

void SummaryReport ( report_t *report, char *dtlName)
{      
       LogEntry(L"SummaryReport entry\n");

       int                  i;
       wchar_t              *rootStrType,*localStr,timeStr[48];
       wchar_t              fileBuff[64];

       struct tm *timeVals;
       timeVals = localtime (&logHdr.date);
       wcsftime (timeStr,47,L"%a, %#d %b, %Y at %X",timeVals);

       /*  Print the header information  */
       DisplayReportFile (report);
       ReportEntry (report,L" Filesystem Audit Summary Report\n\n");
       ReportEntry (report,L"Source file: %s, Created: %ls\n\n",dtlName,timeStr);
       ReportEntry (report,L"Server: %ls",srvrName);
… …
Run Code Online (Sandbox Code Playgroud)

c unix linux

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

如何在google maps v3中更改海洋的颜色

我在我正在创建的新网站中使用谷歌地图v3,我希望能够将海洋颜色显示为白色或透明.我无法看到如何做到这一点,如果有人知道我会感谢你的帮助.

顺便说一句,谷歌地图是国家:爱尔兰

html javascript google-maps

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

标签 统计

c ×2

linux ×2

binary ×1

file-io ×1

google-maps ×1

html ×1

javascript ×1

unix ×1