您尚未登录。

楼主 #1 2017-12-28 14:25:36

sindy
会员
注册时间: 2017-09-09
已发帖子: 146
积分: 146

一行简单的fwrite代码在VC2015下面出错,请问是怎么回事

    uint8_t buffer = 0xFF;
    fpRAM = fopen("x.bin", "w+");
    fseek(fpRAM, 0, SEEK_SET);
    fwrite(&buffer, 1024, 10240, fpRAM);

>    ucrtbased.dll!write_text_ansi_nolock(const int fh, const char * const buffer, const unsigned int buffer_size) 行 310    C++
     ucrtbased.dll!_write_nolock(int fh, const void * buffer, unsigned int buffer_size) 行 576    C++
     ucrtbased.dll!_write(int fh, const void * buffer, unsigned int size) 行 63    C++
     ucrtbased.dll!_fwrite_nolock(const void * buffer, unsigned __int64 element_size, unsigned __int64 element_count, _iobuf * public_stream) 行 117    C++
     ucrtbased.dll!fwrite::__l9::<lambda>() 行 39    C++
     ucrtbased.dll!__crt_seh_guarded_call<unsigned __int64>::operator()<void <lambda>(void),unsigned __int64 <lambda>(void) & __ptr64,void <lambda>(void) >(__acrt_lock_stream_and_call::__l3::void <lambda>(void) && setup, fwrite::__l9::unsigned __int64 <lambda>(void) & action, __acrt_lock_stream_and_call::__l4::void <lambda>(void) && cleanup) 行 199    C++
     ucrtbased.dll!__acrt_lock_stream_and_call<unsigned __int64 <lambda>(void) >(_iobuf * const stream, fwrite::__l9::unsigned __int64 <lambda>(void) && action) 行 256    C++
     ucrtbased.dll!fwrite(const void * buffer, unsigned __int64 size, unsigned __int64 count, _iobuf * stream) 行 41    C++
     littlefs.exe!init(...) 行 27    C
     littlefs.exe!main() 行 32    C
     [外部代码]

一行简单的fwrite代码在VC2015下面出错,请问是怎么回事

离线

楼主 #2 2017-12-28 14:27:19

sindy
会员
注册时间: 2017-09-09
已发帖子: 146
积分: 146

Re: 一行简单的fwrite代码在VC2015下面出错,请问是怎么回事

QQ20171228142741.png

离线

楼主 #4 2017-12-28 15:34:49

sindy
会员
注册时间: 2017-09-09
已发帖子: 146
积分: 146

Re: 一行简单的fwrite代码在VC2015下面出错,请问是怎么回事

就是这个问题, 搞定, 谢谢。

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn